FcPatternIterGetValue(3)
π FcPatternIterGetValue β the manual page, but make it cute
okay so bestie, welcome to FcPatternIterGetValue(3) β yes that's the whole manual name, section 3, we're in C-library land now π«Ά
β¨ NAME β¨
FcPatternIterGetValue β hands you back a value that your iterator is currently pointing at π«
πΈ SYNOPSIS πΈ
#include <fontconfig/fontconfig.h>
FcResult FcPatternIterGetValue (const FcPattern *p, FcPatternIter *iter, int id, FcValue *v, FcValueBinding *b);
the way that signature is long β but like, every single piece is doing something, so let's not skip anybody π
π DESCRIPTION π
So here's the vibe: your iterator is chilling somewhere inside a pattern, right? This function goes and grabs the id'th value that iter is pointing at, and drops it into v. Slay. β¨
And if you also hand it b, it'll write the binding in there too. Two for one, no cap π
Now the important part, the part where you listen to me π β the value that comes back is not a copy. It literally refers to the data stored inside the pattern itself. So like...
β οΈ Applications must not free this value. Not even a little. Not even if you're being polite about it. That's not your memory to free, bestie, and freeing it is giving undefined-behaviour main character energy π
think of it as borrowing your friend's hoodie β you wear it, you look cute, but you give it back by not setting it on fire π₯
Key bits to remember, fr fr:
- the
const FcPattern *pis the pattern you're poking at π¦ FcPatternIter *iteris the iterator doing the pointingint idis which value you want β theid'th oneFcValue *vis where that value landsFcValueBinding *bgets the binding β but only if you actually pass it, otherwise it's skipped π- the return type is
FcResult
β SINCE β
this one's been around since version 2.13.1 β an icon, an elder, a legend π
<div align="center"></div>
okay that's the whole page!! no notes, you ate that π
π§ signing off with the receipts: this is from Fontconfig 2.17.0, dated 27 June 2025. go forth and do not free that value ππ
π¦ 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