FcCharSetFirstPage(3)

✨ FcCharSetFirstPage(3) ✨

okay so bestie, welcome to the FcCharSetFirstPage page of the fontconfig manual πŸ’… this one's a lil deep-cuts, but it's lowkey iconic once you get the vibe.


🌸 NAME 🌸

FcCharSetFirstPage β€” start enumerating charset contents πŸŽ€

like, the first step energy. the opening credits. the "let's begin" moment πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fontconfig/fontconfig.h>

FcChar32 FcCharSetFirstPage (const FcCharSet *a, FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next);

πŸ’– DESCRIPTION πŸ’–

So what's the tea? FcCharSetFirstPage builds up an array of bits in map that marks the first page of Unicode coverage of a. ✨

Then *next gets set to contain the base code point for the next page in a. (yes, "is set to contains" β€” that's what the manual says, we don't gatekeep grammar here 🫢)

It returns the base code point for that page, or FC_CHARSET_DONE if a contains no pages at all. πŸ’€


πŸ“ the example, because it slays

Say FcCharSetFirstPage returns 0x300, and fills map with:

0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003

Then the page contains code points 0x300 through 0x33f β€” that's the first 64 code points on the page β€” because map[0] and map[1] both have all their bits set. πŸ”₯

It also contains:

  • code point 0x343 (0x300 + 32*2 + (4-1))
  • code point 0x35e (0x300 + 32*2 + (31-1))

...because map[2] has the 4th and 31st bits set. the way that math ate?? πŸ’…

And the code points represented by map[3] and later? bestie, the manual literally says those are left as an exercise for the reader ;). no cap, that's the actual bit. iykyk 😭


🌈 the cute sign-off 🌈

this lil beauty is from Fontconfig 2.17.0, dated 27 June 2025 β€” so go forth, enumerate those pages, and remember: map[3] and beyond are your problem now πŸ§šπŸ’œ

πŸ“¦ where this page comes from