FcPatternAdd-Type(3)

okay so bestie, welcome to the FcPatternAdd-Type(3) manual page β€” this is literally the typed-value glow-up for fontconfig patterns, and it’s giving convenience-function excellence πŸ’…βœ¨

πŸ’– NAME πŸ’–

Add a typed value to a pattern. The whole squad is:

  • FcPatternAddInteger
  • FcPatternAddDouble
  • FcPatternAddString
  • FcPatternAddMatrix
  • FcPatternAddCharSet
  • FcPatternAddBool
  • FcPatternAddFTFace
  • FcPatternAddLangSet
  • FcPatternAddRange

✨ SYNOPSIS ✨

#include <fontconfig/fontconfig.h>

FcBool FcPatternAddInteger (FcPattern *p, const char *object, int i);

FcBool FcPatternAddDouble (FcPattern *p, const char *object, double d);

FcBool FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s);

FcBool FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *m);

FcBool FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c);

FcBool FcPatternAddBool (FcPattern *p, const char *object, FcBool b);

FcBool FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f);

FcBool FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *l);

FcBool FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r);

🌸 DESCRIPTION 🌸

okay so every single one of these is a convenience function, and what it does is insert an object of the type its name says into the pattern. Use these instead of FcPatternAdd β€” they’re the upgrade because they give you compile-time typechecking, no cap. Every one of them appends its value to any existing list of values. Tiny timestamp note: FcPatternAddRange are available since 2.11.91.


πŸ’– kisses, this page is from Fontconfig 2.17.0, dated 27 June 2025 β€” go add those typed values, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from