FcUtf16Len(3)
okay so welcome to the FcUtf16Len page from the fontconfig manual, bestie π
β¨ this one is short and sweet and itβs all about counting UTF-16 encoded chars, no cap π¦
π NAME π
FcUtf16Len β count UTF-16 encoded chars. thatβs literally the whole name and honestly it ate π
β¨ SYNOPSIS β¨
include this header and call it like so, bestie:
#include <fontconfig/fontconfig.h>
FcBool FcUtf16Len (FcChar8 *src, FcEndian endian, int len, int *nchar, int *wchar);
πΈ DESCRIPTION πΈ
okay so hereβs the tea: FcUtf16Len counts the number of Unicode chars in len bytes of src. Bytes of src are combined into 16-bit units according to endian. π«Ά
the count gets placed in nchar β¨
and wchar contains 1, 2 or 4 depending on the number of bytes needed to hold the largest Unicode char counted π
the FcBool return value indicates whether string is a well-formed UTF16 string β itβs giving vibe check for UTF16, fr fr π
hereβs the parameter lineup so nobody gets confused π
srcβ the bytes weβre looking at; we count Unicode chars inlenbytes of it.endianβ decides how bytes ofsrcget combined into 16-bit units.lenβ how many bytes ofsrcweβre counting.ncharβ where that count gets placed.wcharβ contains1,2or4depending on the number of bytes needed to hold the largest Unicode char counted.
this page was brought to you by Fontconfig 2.17.0, dated 27 June 2025 π«Άπβ¨
π¦ 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