XTextWidth(3X11) XLIB FUNCTIONS XTextWidth(3X11)NAME
XTextWidth, XTextWidth16 - compute text width
SYNTAX
int XTextWidth(XFontStruct *font_struct, char *string, int count);
int XTextWidth16(XFontStruct *font_struct, XChar2b *string, int count);
ARGUMENTS
count Specifies the character count in the specified string.
font_struct
Specifies the font used for the width computation.
string Specifies the character string.
DESCRIPTION
The XTextWidth and XTextWidth16 functions return the width of the specified 8-bit or 2-byte character strings.
SEE ALSO XLoadFont(3X11), XTextExtents(3X11)
Xlib - C Language X Interface
XFree86 Version 4.7.0 XTextWidth(3X11)
Check Out this Related Man Page
XTextWidth() XTextWidth()
Name
XTextWidth - get the width in pixels of an 8-bit character string, locally.
Synopsis
int XTextWidth(font_struct, string, count)
XFontStruct *font_struct;
char *string;
int count;
Arguments
font_struct
Specifies the font description structure of the font in which you want to draw the string.
string Specifies the character string whose width is to be returned.
count Specifies the character count in string.
Returns
The width in pixels.
Description
XTextWidth() returns the width in pixels of the specified string using the specified font. This is the sum of the XCharStruct.width for
each character in the string. This is also equivalent to the value of overall.width returned by XQueryTextExtents() or XTextExtents().
The calculation is done assuming 8-bit font indexing.
For more information on drawing text, see Volume One, Chapter 6, Drawing Graphics and Text.
Structures
typedef struct {
XExtData *ext_data; /* hook for extension to hang data */
Font fid; /* font ID for this font */
unsigned direction; /* hint about direction the font is painted */
unsigned min_char_or_byte2; /* first character */
unsigned max_char_or_byte2; /* last character */
unsigned min_byte1; /* first row that exists */
unsigned max_byte1; /* last row that exists */
Bool all_chars_exist; /* flag if all characters have non-zero size*/
unsigned default_char; /* char to print for undefined character */
int n_properties; /* how many properties there are */
XFontProp *properties; /* pointer to array of additional properties*/
XCharStruct min_bounds; /* minimum bounds over all existing char*/
XCharStruct max_bounds; /* maximum bounds over all existing char*/
XCharStruct *per_char; /* first_char to last_char information */
int ascent; /* logical extent above baseline for spacing */
int descent; /* logical descent below baseline for spacing */
} XFontStruct;
See Also
XDrawImageString(), XDrawImageString16(), XDrawString(), XDrawString16(), XDrawText(), XDrawText16(), XQueryTextExtents(), XQueryTextEx-
tents16(), XTextExtents(), XTextExtents16(), XTextWidth16().
Xlib - Text XTextWidth()
There is no xorg.conf file and no XF86Config file on a certain FreeBSD machine:
# locate xorg.conf
/usr/local/man/man5/xorg.conf.5.gz
# locate XF86Config
#
Can someone let me know if that means that there is a bare bones set up possible only? xrandr works fine, but I am looking for ways to... (6 Replies)
I'm looking for finer granularity than the 20 ANSI escape sequence screen modes. What I'd like to do is have the terminal increase it's own height when I have to show the user a long menu.
Platform is Cygwin 64 running over Win 7 Pro.
Mike (4 Replies)
What is the point of this? Whenever I close my shell it appends to the history file without adding this. I have never seen it overwrite my history file.
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend (3 Replies)
Look this very good rendering on Slackware 14.2
in my opinion is near perfect.
https://i.stack.imgur.com/q5trL.png
Now look the same page on Fedora 30
https://i.stack.imgur.com/FBQv7.png
In my opinion the fonts on Fedora are too small and difficult to read, I prefer the fat fonts of... (20 Replies)