1XmbTextPerCharExtents(3)        XLIB FUNCTIONS        XmbTextPerCharExtents(3)
2
3
4

NAME

6       XmbTextPerCharExtents, XwcTextPerCharExtents, Xutf8TextPerCharExtents -
7       obtain per-character information for a text string
8

SYNTAX

10       Status XmbTextPerCharExtents(XFontSet font_set, _Xconst  char  *string,
11              int  num_bytes,  XRectangle *ink_array_return, XRectangle *logi‐
12              cal_array_return, int array_size, int *num_chars_return,  XRect‐
13              angle *overall_ink_return, XRectangle *overall_logical_return);
14
15       Status   XwcTextPerCharExtents(XFontSet   font_set,   _Xconst   wchar_t
16              *string, int num_wchars, XRectangle *ink_array_return,  XRectan‐
17              gle      *logical_array_return,      int     array_size,     int
18              *num_chars_return,  XRectangle  *overall_ink_return,  XRectangle
19              *overall_logical_return);
20
21       Status Xutf8TextPerCharExtents(XFontSet font_set, _Xconst char *string,
22              int num_bytes, XRectangle *ink_array_return,  XRectangle  *logi‐
23              cal_array_return,  int array_size, int *num_chars_return, XRect‐
24              angle *overall_ink_return, XRectangle *overall_logical_return);
25

ARGUMENTS

27       array_size
28                 Specifies   the   size   of   ink_array_return   and    logi‐
29                 cal_array_return.   The  caller  must  pass in arrays of this
30                 size.
31
32       font_set  Specifies the font set.
33
34       ink_array_return
35                 Returns the ink dimensions for each character.
36
37       logical_array_return
38                 Returns the logical dimensions for each character.
39
40       num_bytes Specifies the number of bytes in the string argument.
41
42       num_chars_return
43                 Returns the number of characters in the string argument.
44
45       num_wchars
46                 Specifies the number of characters in the string argument.
47
48       overall_ink_return
49                 Returns the overall ink extents of the entire string.
50
51       overall_logical_return
52                 Returns the overall logical extents of the entire string.
53
54       string    Specifies the character string.
55

DESCRIPTION

57       The  XmbTextPerCharExtents,  XwcTextPerCharExtents  and   Xutf8TextPer‐
58       CharExtents  functions  return the text dimensions of each character of
59       the specified text, using the fonts loaded for the specified font  set.
60       Each successive element of ink_array_return and logical_array_return is
61       set to the successive character's drawn metrics, relative to the  draw‐
62       ing  origin  of  the string and one rectangle for each character in the
63       supplied text string.  The number of elements of  ink_array_return  and
64       logical_array_return    that    have    been   set   is   returned   to
65       num_chars_return.
66
67       Each element of ink_array_return is set to the bounding box of the cor‐
68       responding  character's  drawn foreground color.  Each element of logi‐
69       cal_array_return is set to the bounding box that provides minimum spac‐
70       ing to other graphical features for the corresponding character.  Other
71       graphical features should not intersect any of the logical_array_return
72       rectangles.
73
74       Note  that an XRectangle represents the effective drawing dimensions of
75       the character, regardless of the number of font glyphs that are used to
76       draw  the  character  or the direction in which the character is drawn.
77       If multiple characters map to a single character glyph, the  dimensions
78       of all the XRectangles of those characters are the same.
79
80       When  the  XFontSet  has missing charsets, metrics for each unavailable
81       character are taken from the default string returned by  XCreateFontSet
82       so  that  the  metrics represent the text as it will actually be drawn.
83       The behavior for an invalid codepoint is undefined.
84
85       If the array_size is too small for the number of characters in the sup‐
86       plied  text,  the  functions return zero and num_chars_return is set to
87       the number of rectangles required.  Otherwise, the functions  return  a
88       nonzero value.
89
90       If  the  overall_ink_return  or overall_logical_return argument is non-
91       NULL, XmbTextPerCharExtents,  XwcTextPerCharExtents  and  Xutf8TextPer‐
92       CharExtents  return the maximum extent of the string's metrics to over‐
93       all_ink_return or overall_logical_return,  as  returned  by  XmbTextEx‐
94       tents, XwcTextExtents or Xutf8TextExtents.
95
96       The  function Xutf8TextPerCharExtents is an extension introduced by The
97       XFree86 Project, Inc., in their 4.0.2 release.  Its presence  is  indi‐
98       cated by the macro X_HAVE_UTF8_STRING.
99

SEE ALSO

101       XmbTextEscapement(3), XmbTextExtents(3) Xlib - C Language X Interface
102
103
104
105X Version 11                     libX11 1.6.12        XmbTextPerCharExtents(3)
Impressum