1
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
2
.\" Copyright \(co 2000 The XFree86 Project, Inc.
4
.\" Permission is hereby granted, free of charge, to any person obtaining
5
.\" a copy of this software and associated documentation files (the
6
.\" "Software"), to deal in the Software without restriction, including
7
.\" without limitation the rights to use, copy, modify, merge, publish,
8
.\" distribute, sublicense, and/or sell copies of the Software, and to
9
.\" permit persons to whom the Software is furnished to do so, subject to
10
.\" the following conditions:
12
.\" The above copyright notice and this permission notice shall be included
13
.\" in all copies or substantial portions of the Software.
15
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
19
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21
.\" OTHER DEALINGS IN THE SOFTWARE.
23
.\" Except as contained in this notice, the name of the X Consortium shall
24
.\" not be used in advertising or otherwise to promote the sale, use or
25
.\" other dealings in this Software without prior written authorization
26
.\" from the X Consortium.
28
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
29
.\" Digital Equipment Corporation
31
.\" Portions Copyright \(co 1990, 1991 by
34
.\" Permission to use, copy, modify and distribute this documentation for
35
.\" any purpose and without fee is hereby granted, provided that the above
36
.\" copyright notice appears in all copies and that both that copyright notice
37
.\" and this permission notice appear in all copies, and that the names of
38
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
39
.\" to this documentation without specific, written prior permission.
40
.\" Digital and Tektronix makes no representations about the suitability
41
.\" of this documentation for any purpose.
42
.\" It is provided ``as is'' without express or implied warranty.
44
.\" $XFree86: xc/doc/man/X11/XmbTExt.man,v 1.4 2001/01/27 18:20:08 dawes Exp $
46
.ds xT X Toolkit Intrinsics \- C Language Interface
47
.ds xW Athena X Widgets \- C Language X Toolkit Interface
48
.ds xL Xlib \- C Language X Interface
49
.ds xC Inter-Client Communication Conventions Manual
56
.\".if \\n(VS>=40 .vs \\n(VSu
57
.\".if \\n(VS<=39 .vs \\n(VSp
80
.de IN \" send an index entry to the stderr
87
.\" choose appropriate monospace font
88
.\" the imagen conditional, 480,
89
.\" may be changed to L if LB is too
90
.\" heavy for your eyes...
92
.ie "\\*(.T"480" .ft L
93
.el .ie "\\*(.T"300" .ft L
94
.el .ie "\\*(.T"202" .ft PO
95
.el .ie "\\*(.T"aps" .ft CW
98
.ie \\n(VS>40 .vs \\n(VSu
106
.ie t \\$1\fB\^\\$2\^\fR\\$3
107
.el \\$1\fI\^\\$2\^\fP\\$3
110
.ie t \fB\^\\$1\^\fR\\$2
111
.el \fI\^\\$1\^\fP\\$2
114
.ie t <\fB\\$1\fR>\\$2
120
.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
121
.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
135
. \" Note End -- doug kraft 3/85
144
.TH XmbTextExtents 3X11 __xorgversion__ "XLIB FUNCTIONS"
146
XmbTextExtents, XwcTextExtents, Xutf8TextExtents \- compute text extents
148
int XmbTextExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^)
150
XFontSet \fIfont_set\fP\^;
152
char *\fIstring\fP\^;
154
int \fInum_bytes\fP\^;
156
XRectangle *\fIoverall_ink_return\fP\^;
158
XRectangle *\fIoverall_logical_return\fP\^;
160
int XwcTextExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_wchars\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^)
162
XFontSet \fIfont_set\fP\^;
164
wchar_t *\fIstring\fP\^;
166
int \fInum_wchars\fP\^;
168
XRectangle *\fIoverall_ink_return\fP\^;
170
XRectangle *\fIoverall_logical_return\fP\^;
172
int Xutf8TextExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^)
174
XFontSet \fIfont_set\fP\^;
176
char *\fIstring\fP\^;
178
int \fInum_bytes\fP\^;
180
XRectangle *\fIoverall_ink_return\fP\^;
182
XRectangle *\fIoverall_logical_return\fP\^;
184
.IP \fIfont_set\fP 1i
185
Specifies the font set.
186
.IP \fInum_bytes\fP 1i
187
Specifies the number of bytes in the string argument.
188
.IP \fInum_wchars\fP 1i
189
Specifies the number of characters in the string argument.
191
.IP \fIoverall_ink_return\fP 1i
192
Returns the overall ink \*(Ov.
193
.IP \fIoverall_logical_return\fP 1i
194
Returns the overall logical \*(Ov.
196
Specifies the character string.
203
functions set the components of the specified overall_ink_return and
204
overall_logical_return
205
arguments to the overall bounding box of the string's image
206
and a logical bounding box for spacing purposes, respectively.
207
They return the value returned by
208
.ZN XmbTextEscapement ,
209
.ZN XwcTextEscapement
211
.ZN Xutf8TextEscapement .
212
These metrics are relative to the drawing origin of the string,
213
using the fonts loaded for the specified font set.
215
If the overall_ink_return argument is non-NULL,
216
it is set to the bounding box of the string's character ink.
217
The overall_ink_return for a nondescending, horizontally drawn
218
Latin character is conventionally entirely above the baseline;
219
that is, overall_ink_return.height <= \-overall_ink_return.y.
220
The overall_ink_return for a nonkerned character
221
is entirely at, and to the right of, the origin;
222
that is, overall_ink_return.x >= 0.
223
A character consisting of a single pixel at the origin would set
224
overall_ink_return fields y = 0, x = 0, width = 1, and height = 1.
226
If the overall_logical_return argument is non-NULL,
227
it is set to the bounding box that provides minimum spacing
228
to other graphical features for the string.
229
Other graphical features, for example, a border surrounding the text,
230
should not intersect this rectangle.
234
has missing charsets,
235
metrics for each unavailable character are taken
236
from the default string returned by
238
so that the metrics represent the text as it will actually be drawn.
239
The behavior for an invalid codepoint is undefined.
243
is an XFree86 extension introduced in XFree86 4.0.2. Its presence is
244
indicated by the macro
245
.ZN X_HAVE_UTF8_STRING .
247
XmbTextEscapement(3X11),
248
XmbTextPerCharExtents(3X11)