XmbTextEscapement(3)
π NAME π
okay so welcome to the XmbTextEscapement(3) page, bestie β it lives in the XLIB FUNCTIONS manual and it's literally about obtaining the escapement of text. The three main-character functions are XmbTextEscapement, XwcTextEscapement, and Xutf8TextEscapement. They all do the same flavor of thing, just with different string types. periodt. β¨
β¨ SYNTAX β¨
no cap, here are the exact signatures:
int XmbTextEscapement(XFontSet font_set, _Xconst char *string, int num_bytes);
int XwcTextEscapement(XFontSet font_set, _Xconst wchar_t *string, int num_wchars);
int Xutf8TextEscapement(XFontSet font_set, _Xconst char *string, int num_bytes);
πΈ ARGUMENTS πΈ
font_setβ specifies the font set. it's giving "which fonts are we working with" energy πnum_bytesβ specifies the number of bytes in thestringargument. byte-count realness π₯num_wcharsβ specifies the number of characters in thestringargument. character-count realness, but make it wide π¦stringβ specifies the character string. the actual text we're measuring, bestie πΈ
π¦ DESCRIPTION π¦
so the XmbTextEscapement, XwcTextEscapement, and Xutf8TextEscapement functions return the escapement in pixels of the specified string as a value, using the fonts loaded for the specified font set. the escapement is the distance in pixels in the primary draw direction from the drawing origin to the origin of the next character to be drawn β assuming that the rendering of the next character is not dependent on the supplied string. iykyk, it's the "where does the next glyph start" measurement. π
regardless of the character rendering order, the escapement is always positive. always. no negative escapement drama here. π
the function Xutf8TextEscapement is an extension introduced by The XFree86 Project, Inc., in their 4.0.2 release. its presence is indicated by the macro X_HAVE_UTF8_STRING. so if you see that macro, that's the vibe check saying UTF-8 escapement is in the building. π
π SEE ALSO π
XmbTextExtents(3)XmbTextPerCharExtents(3)Xlib - C Language X Interface
xoxo, signing off from X Version 11 Β· libX11 1.8.14 β that's the source/version stamp, and the footer's date slot is a no-show here, bestie πβ¨π«Ά
π¦ 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