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 the string argument. byte-count realness πŸ”₯
  • num_wchars β€” specifies the number of characters in the string argument. 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 🌈


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