FcPatternGet(3)
π FcPatternGet(3) β the section 3 girlies know π
okay so picture this: you're deep in a fontconfig pattern (FcPattern, iconic struct of all time), and you just wanna peek at one little value inside it. that's literally this function. it's the "hey bestie can I see that" of the fontconfig API π«Ά
β¨ NAME β¨
FcPatternGet β return a value from a pattern. that's it. that's the whole job. no cap π
π SYNOPSIS π
#include <fontconfig/fontconfig.h>
FcResult FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v);
look at her. FcResult coming back out, p the pattern, object the property name, id the index, v where the answer lands. she's giving organized. she's giving functional. periodt β¨
π¦ DESCRIPTION π¦
so here's the tea, and it's important so listen up π:
FcPatternGet returns in v the id'th value associated with the property object. like, the value at that index for that property name. that's the whole vibe check.
β οΈ okay this part is the main character of the whole page, fr fr: the value returned is not a copy. it refers to the data stored within the pattern directly. so it's pointing right back into the pattern's own storage β not a cute little duplicate you get to keep.
and because of that: applications must not free this value. not "should maybe consider not" β must not. do not free it. do not free() her. do not touch her with a deallocator. she is not yours to destroy ππ the pattern owns her, you're just borrowing a glance. iykyk.
so yeah: peek, use, don't free. slay π₯π
that's the whole page bestie, you ate that π
this little beauty comes to you from Fontconfig 2.17.0, dated 27 June 2025 β mwah, mwah, bye πβ¨π
π¦ where this page comes from
- fedora 43: fontconfig-devel 2.17.0-3.fc43 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- fedora 43: fontconfig-devel 2.17.0-3.fc43 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- fedora 44: fontconfig-devel 2.17.0-4.fc44 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- fedora 44: fontconfig-devel 2.17.0-4.fc44 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms