FcUtf16ToUcs4(3)
π FcUtf16ToUcs4(3) β the fontconfig girlies know π
okay so bestie, we're in the FcUtf16ToUcs4 corner of the fontconfig manual (FcUtf16ToUcs4(3), section 3, iykyk) and honestly? it's a little baddie of a function. let's get into it β¨
πΈ NAME πΈ
FcUtf16ToUcs4 β convert UTF-16 to UCS4. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
#include <fontconfig/fontconfig.h>
int FcUtf16ToUcs4 (FcChar8 *src, FcEndian endian, FcChar32 *dst, int len);
like, iconic signature. no notes. π
β¨ DESCRIPTION β¨
so here's the tea β β FcUtf16ToUcs4 converts the next Unicode char from src into dst, and returns the number of bytes containing the char. that return value is literally your receipt of how much src got eaten π§Ύπ
src must be at least len bytes long β no cap, that's non-negotiable, so pls don't hand it a buffer that's too short π
and the bytes of src? they get combined into 16-bit units according to endian. so endian is the main character here, deciding how those bytes get stitched together πͺ‘β¨
fr fr:lenis the length you're promisingsrchas, andendiancontrols the byte pairing. get those right and you're slaying.
π sign-off π
this lil masterpiece is from Fontconfig 2.17.0, dated 27 June 2025 β a whole era. go forth and convert those chars, bestie ππ«Ά
π¦ 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