FcWeightToOpenTypeDouble(3)

πŸ’… FcWeightToOpenTypeDouble(3) β€” the fontconfig glow-up page

okay bestie, so this is a fontconfig manpage, section 3, and the star of the show is FcWeightToOpenTypeDouble. yes the name is a mouthful, no we are not renaming it, it's iconic and we respect it πŸŽ€


✨ NAME ✨

FcWeightToOpenTypeDouble β€” literally the function that converts fontconfig weight values into OpenType ones. that's the whole job. that's her main character arc πŸ¦‹

✨ SYNOPSIS ✨

#include <fontconfig/fontconfig.h>

double FcWeightToOpenTypeDouble (double ot_weight);

so you include the header (as always, #include <fontconfig/fontconfig.h>, no notes πŸ“Ž) and then you call her with a double and she hands you back a double. double in, double out. symmetry. slay.

✨ DESCRIPTION ✨

okay so here's the tea β˜• β€” FcWeightToOpenTypeDouble is the inverse of FcWeightFromOpenType. they're giving complementary energies, yin and yang, the whole thing πŸ’«

and now the important part, bestie, because this is the vibe check that can fail:

  • if the input is less than FC_WEIGHT_THIN β€” too tiny, rejected πŸ™ˆ
  • or if the input is greater than FC_WEIGHT_EXTRABLACK β€” too much, also rejected πŸ’€
  • in either of those cases she returns -1. that's your "nope, out of range" signal, no cap.

otherwise? she returns a number in the range 1 to 1000. clean. gorgeous. a full range. πŸ”₯

fr fr keep those bounds in mind β€” -1 is the "out of bounds" answer, not a real weight, so don't go treating it like one.

✨ SINCE ✨

available since version 2.12.92 ⭐ like she's been here, she's established, she's not new here πŸ’…


and that's the whole page, bestie β€” short, sweet, and extremely specific 🫢

this one's from Fontconfig 2.17.0, dated 27 June 2025, and it's the FcWeightToOpenTypeDouble(3) page β€” go convert some weights, ily, bye! πŸŽ€πŸŒΈβœ¨

πŸ“¦ where this page comes from