1XmbTextPerCharExtents(3) XLIB FUNCTIONS XmbTextPerCharExtents(3)
2
3
4
6 XmbTextPerCharExtents, XwcTextPerCharExtents, Xutf8TextPerCharExtents -
7 obtain per-character information for a text string
8
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 *num_chars_re‐
18 turn, XRectangle *overall_ink_return, XRectangle *overall_logi‐
19 cal_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
27 array_size
28 Specifies the size of ink_array_return and logical_array_re‐
29 turn. The caller must pass in arrays of this size.
30
31 font_set Specifies the font set.
32
33 ink_array_return
34 Returns the ink dimensions for each character.
35
36 logical_array_return
37 Returns the logical dimensions for each character.
38
39 num_bytes Specifies the number of bytes in the string argument.
40
41 num_chars_return
42 Returns the number of characters in the string argument.
43
44 num_wchars
45 Specifies the number of characters in the string argument.
46
47 overall_ink_return
48 Returns the overall ink extents of the entire string.
49
50 overall_logical_return
51 Returns the overall logical extents of the entire string.
52
53 string Specifies the character string.
54
56 The XmbTextPerCharExtents, XwcTextPerCharExtents and Xutf8TextPer‐
57 CharExtents functions return the text dimensions of each character of
58 the specified text, using the fonts loaded for the specified font set.
59 Each successive element of ink_array_return and logical_array_return is
60 set to the successive character's drawn metrics, relative to the draw‐
61 ing origin of the string and one rectangle for each character in the
62 supplied text string. The number of elements of ink_array_return and
63 logical_array_return that have been set is returned to num_chars_re‐
64 turn.
65
66 Each element of ink_array_return is set to the bounding box of the cor‐
67 responding character's drawn foreground color. Each element of logi‐
68 cal_array_return is set to the bounding box that provides minimum spac‐
69 ing to other graphical features for the corresponding character. Other
70 graphical features should not intersect any of the logical_array_return
71 rectangles.
72
73 Note that an XRectangle represents the effective drawing dimensions of
74 the character, regardless of the number of font glyphs that are used to
75 draw the character or the direction in which the character is drawn.
76 If multiple characters map to a single character glyph, the dimensions
77 of all the XRectangles of those characters are the same.
78
79 When the XFontSet has missing charsets, metrics for each unavailable
80 character are taken from the default string returned by XCreateFontSet
81 so that the metrics represent the text as it will actually be drawn.
82 The behavior for an invalid codepoint is undefined.
83
84 If the array_size is too small for the number of characters in the sup‐
85 plied text, the functions return zero and num_chars_return is set to
86 the number of rectangles required. Otherwise, the functions return a
87 nonzero value.
88
89 If the overall_ink_return or overall_logical_return argument is non-
90 NULL, XmbTextPerCharExtents, XwcTextPerCharExtents and Xutf8TextPer‐
91 CharExtents return the maximum extent of the string's metrics to over‐
92 all_ink_return or overall_logical_return, as returned by XmbTextEx‐
93 tents, XwcTextExtents or Xutf8TextExtents.
94
95 The function Xutf8TextPerCharExtents is an extension introduced by The
96 XFree86 Project, Inc., in their 4.0.2 release. Its presence is indi‐
97 cated by the macro X_HAVE_UTF8_STRING.
98
100 XmbTextEscapement(3), XmbTextExtents(3) Xlib - C Language X Interface
101
102
103
104X Version 11 libX11 1.7.2 XmbTextPerCharExtents(3)