FcWeightFromOpenTypeDouble(3)

okay so bestie, this is the FcWeightFromOpenTypeDouble(3) page πŸ’– β€” the manual for the little fontconfig translator that takes OpenType weight values and turns them into fontconfig ones. No cap, it's giving utility-function main character energy. ✨


✨ NAME ✨

FcWeightFromOpenTypeDouble β€” Convert from OpenType weight values to fontconfig ones. That's literally the whole vibe: OpenType weight in, fontconfig weight out. πŸŽ€

🌸 SYNOPSIS 🌸

#include <fontconfig/fontconfig.h>

double FcWeightFromOpenTypeDouble (double ot_weight);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so FcWeightFromOpenTypeDouble returns a double value to use with FC_WEIGHT, and it takes a double in the 1..1000 range, resembling the numbers from the OpenType specification's OS/2 usWeight numbers β€” which are also similar to CSS font-weight numbers, iykyk. πŸ‘‘

If the input is negative, zero, or greater than 1000, it returns -1. Bestie, that's the rule. 🫢

This function linearly interpolates between various FC_WEIGHT_* constants. As such, the returned value does not necessarily match any of the predefined constants. It's cute like that. πŸ’…

πŸ’œ SINCE πŸ’œ

version 2.12.92 ✨


mwah πŸ’‹ β€” this cutie is from Fontconfig 2.17.0, dated 27 June 2025, and it's the FcWeightFromOpenTypeDouble(3) manual page. πŸŽ€

πŸ“¦ where this page comes from