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 🌸


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