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

NAME

6       XmbTextExtents, XwcTextExtents, Xutf8TextExtents - compute text extents
7

SYNTAX

9       int   XmbTextExtents(XFontSet   font_set,  _Xconst  char  *string,  int
10              num_bytes,  XRectangle  *overall_ink_return,  XRectangle  *over‐
11              all_logical_return);
12
13       int  XwcTextExtents(XFontSet  font_set,  _Xconst  wchar_t  *string, int
14              num_wchars, XRectangle  *overall_ink_return,  XRectangle  *over‐
15              all_logical_return);
16
17       int  Xutf8TextExtents(XFontSet  font_set,  _Xconst  char  *string,  int
18              num_bytes,  XRectangle  *overall_ink_return,  XRectangle  *over‐
19              all_logical_return);
20

ARGUMENTS

22       font_set  Specifies the font set.
23
24       num_bytes Specifies the number of bytes in the string argument.
25
26       num_wchars
27                 Specifies the number of characters in the string argument.
28
29       overall_ink_return
30                 Returns the overall ink dimensions.
31
32       overall_logical_return
33                 Returns the overall logical dimensions.
34
35       string    Specifies the character string.
36

DESCRIPTION

38       The  XmbTextExtents,  XwcTextExtents and Xutf8TextExtents functions set
39       the components of the specified  overall_ink_return  and  overall_logi‐
40       cal_return  arguments to the overall bounding box of the string's image
41       and a logical bounding box for spacing  purposes,  respectively.   They
42       return  the  value  returned by XmbTextEscapement, XwcTextEscapement or
43       Xutf8TextEscapement.  These metrics are relative to the drawing  origin
44       of the string, using the fonts loaded for the specified font set.
45
46       If the overall_ink_return argument is non-NULL, it is set to the bound‐
47       ing box of the string's character ink.  The  overall_ink_return  for  a
48       nondescending,  horizontally  drawn  Latin  character is conventionally
49       entirely above the  baseline;  that  is,  overall_ink_return.height  <=
50       -overall_ink_return.y.   The overall_ink_return for a nonkerned charac‐
51       ter is entirely at, and to the right of, the  origin;  that  is,  over‐
52       all_ink_return.x >= 0.  A character consisting of a single pixel at the
53       origin would set overall_ink_return fields y = 0, x = 0, width = 1, and
54       height = 1.
55
56       If  the  overall_logical_return  argument is non-NULL, it is set to the
57       bounding box that provides minimum spacing to other graphical  features
58       for  the  string.  Other graphical features, for example, a border sur‐
59       rounding the text, should not intersect this rectangle.
60
61       When the XFontSet has missing charsets, metrics  for  each  unavailable
62       character  are taken from the default string returned by XCreateFontSet
63       so that the metrics represent the text as it will  actually  be  drawn.
64       The behavior for an invalid codepoint is undefined.
65
66       The function Xutf8TextExtents is an extension introduced by The XFree86
67       Project, Inc., in their 4.0.2 release.  Its presence  is  indicated  by
68       the macro X_HAVE_UTF8_STRING.
69

SEE ALSO

71       XmbTextEscapement(3),  XmbTextPerCharExtents(3)  Xlib  -  C  Language X
72       Interface
73
74
75
76X Version 11                     libX11 1.6.12               XmbTextExtents(3)
Impressum