XTextWidth(3)
π NAME π
okay so bestie, welcome to XTextWidth(3) from the XLIB FUNCTIONS manual β this one is all about XTextWidth and XTextWidth16, and their whole job is literally to compute text width β¨
β¨ SYNTAX β¨
int XTextWidth(XFontStruct *font_struct, _Xconst char *string, int count);
int XTextWidth16(XFontStruct *font_struct, _Xconst XChar2b *string, int count);
π ARGUMENTS π
countβ specifies the character count in the specified string. yes bestie, it's counting characters, not vibes πfont_structβ specifies the font used for the width computation. this is the font main character of the width math π«Άstringβ specifies the character string. the actual text we're measuring, periodt β¨
π¦ DESCRIPTION π¦
so the XTextWidth and XTextWidth16 functions return the width of the specified 8-bit or 2-byte character strings π
like, XTextWidth handles the 8-bit string situation, and XTextWidth16 handles the 2-byte string situation β and both give you the width back. iconic behavior, no cap πΈ
π SEE ALSO πΈ
XLoadFont(3)XTextExtents(3)Xlib - C Language X Interface
that's the tea from X Version 11, libX11 1.8.14 β and the footer has no date listed, so I'm not inventing one, bestie π mwah π
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms