aboutsummaryrefslogtreecommitdiff
path: root/libXft/man/Xft.man
blob: 62439281ce07ff4a397c39fb01df16dd7cac899f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
.\"
.\" Copyright © 2000 Keith Packard
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation, and that the name of Keith Packard not be used in
.\" advertising or publicity pertaining to distribution of the software without
.\" specific, written prior permission.  Keith Packard makes no
.\" representations about the suitability of this software for any purpose.  It
.\" is provided "as is" without express or implied warranty.
.\"
.\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\" EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
.\" DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.TH Xft __libmansuffix__ __vendorversion__
.SH NAME
 Xft \- X FreeType interface library
.SH DESCRIPTION
.B Xft
is a simple library designed to interface the FreeType rasterizer with the X
Rendering Extension.
This manual page barely scratches the surface of this library.
.SH "HEADER FILE"
.B #include <X11/Xft/Xft.h>
.SH CONSTANTS
.TP
.B XFT_MAJOR
is the major version number of
.BR Xft .
.TP
.B XFT_MINOR
is the minor version number of
.BR Xft .
.TP
.B XFT_REVISION
is the revision number of
.BR Xft .
.TP
.B XFT_VERSION
is
.B XFT_MAJOR
times 10000 (ten thousand), plus
.B XFT_MINOR
times 100, plus
.BR XFT_REVISION .
.TP
.B XftVersion
is an alias for
.BR XFT_VERSION .
.PP
The following example illustrates how
.BR Xft 's
version constants might be used:
.nf
    #if (XFT_VERSION >= 20107)
    (void) puts("Version 2.1.7 or later of the Xft library is in"
                " use.");
    #else
    (void) printf("Insufficient version of Xft (%d.%d.%d) installed;
                  " need at least version 2.1.7.\(rsn", XFT_MAJOR,
                  XFT_MINOR,
                  XFT_REVISION);
    #endif
.fi
.\" I don't understand what these are for.  -- BR, 2005-04-02
.\" XFT_CORE                used in xftname.c
.\" XFT_RENDER              used in xftdpy.c, xftfreetype.c, xftname.c
.\" XFT_XLFD                used in xftname.c, xftxlfd.c
.\" XFT_MAX_GLYPH_MEMORY    used in xftdpy.c, xftfreetype.c
.\" XFT_MAX_UNREF_FONTS     used in xftdpy.c
.\" XFT_NMISSING            used in xftcore.c, xftextent.c, xftglyphs.c,
.\"                                 xftrender.c
.SH "DATA TYPES"
.TP
.B XftFont
.nf
typedef struct _XftFont {
    int         ascent;
    int         descent;
    int         height;
    int         max_advance_width;
    FcCharSet   *charset;
    FcPattern   *pattern;
} XftFont;
.fi
An
.B XftFont
is the primary data structure of interest to programmers using
.BR Xft ;
it contains general font metrics and pointers to the Fontconfig
character set and pattern associated with the font.
The
.B FcCharSet
and
.B FcPattern
data types are defined by the Fontconfig library.
.TP
.B ""
.BR XftFont s
are populated with any of
.BR XftFontOpen (),
.BR XftFontOpenName (),
.BR XftFontOpenXlfd (),
.BR XftFontOpenInfo (),
or
.BR XftFontOpenPattern ().
.BR XftFontCopy ()
is used to duplicate
.BR XftFont s,
and
.BR XftFontClose ()
is used to mark an
.B XftFont
as unused.
.BR XftFont s
are internally allocated, reference-counted, and freed by
.BR Xft ;
the programmer does not ordinarily need to allocate or free storage
for them.
.TP
.B ""
.BR XftDrawGlyphs (),
the
.BR XftDrawString *()
family,
.BR XftDrawCharSpec (),
and
.BR XftDrawGlyphSpec ()
use
.BR XftFont s
to render text to an
.B XftDraw
object, which may correspond to either a core X drawable or an X
Rendering Extension drawable.
.TP
.B ""
.BR XftGlyphExtents ()
and the
.BR XftTextExtents *()
family are used to determine the extents (maximum dimensions) of an
.BR XftFont .
.TP
.B ""
An
.BR XftFont 's
glyph or character coverage can be determined with
.BR XftFontCheckGlyph ()
or
.BR XftCharExists ().
.BR XftCharIndex ()
returns the
.BR XftFont -specific
character index corresponding to a given Unicode codepoint.
.TP
.B ""
.BR XftGlyphRender (),
.BR XftGlyphSpecRender (),
.BR XftCharSpecRender (),
and the
.BR XftTextRender *()
family use
.BR XftFont s
to draw into X Rendering Extension
.B Picture
structures.
.B Note:
.BR XftDrawGlyphs (),
the
.BR XftDrawString *()
family,
.BR XftDrawCharSpec (),
and
.BR XftDrawGlyphSpec ()
provide a means of rendering fonts that is independent of the
availability of the X Rendering Extension on the X server.
.\" I'm not sure what these are for; they're used internally, but why
.\" would any external users want them?  -- BR, 2005-04-02
.\" .BR XftLockFace()
.\" .BR XftUnlockFace()
.TP
.B XftFontInfo
is an opaque object that stores information about a font.
.B XftFontInfo
structures are created with
.BR XftFontInfoCreate (),
freed with
.BR XftFontInfoDestroy (),
and compared with
.BR XftFontInfoEqual ().
.B XftFontInfo
objects are internally allocated and freed by
.BR Xft ;
the programmer does not ordinarily need to allocate or free storage
for them.
.TP
.B ""
Each
.B XftFontInfo
structure in use is associated with a unique identifier, which can be
retrieved with
.BR XftFontInfoHash ().
An
.B XftFont
can be opened based on
.B XftFontInfo
data with
.BR XftFontOpenInfo ().
.TP
.B XftColor
.nf
typedef struct _XftColor {
    unsigned long   pixel;
    XRenderColor    color;
} XftColor;
.fi
An
.B XftColor
object permits text and other items to be rendered in a particular
color (or the closest approximation offered by the X visual in use).
The
.B XRenderColor
data type is defined by the X Render Extension library.
.TP
.B ""
.BR XftColorAllocName ()
and
.BR XftColorAllocValue ()
request a color allocation from the X server (if necessary) and
initialize the members of
.BR XftColor .
.BR XftColorFree ()
instructs the X server to free the color currently allocated for an
.BR XftColor .
.TP
.B ""
One an
.B XftColor
has been initialized,
.BR XftDrawSrcPicture (),
.BR XftDrawGlyphs (),
the
.BR XftDrawString *()
family,
.BR XftDrawCharSpec (),
.BR XftDrawCharFontSpec (),
.BR XftDrawGlyphSpec (),
.BR XftDrawGlyphFontSpec (),
and
.BR XftDrawRect ()
may be used to draw various objects using it.
.TP
.B XftDraw
is an opaque object which holds information used to render to an X drawable
using either the core protocol or the X Rendering extension.
.TP
.B ""
.B XftDraw
objects are created with any of
.BR XftDrawCreate ()
(which associates an
.B XftDraw
with an existing X drawable),
.BR XftDrawCreateBitmap (),
or
.BR XftDrawCreateAlpha (),
and destroyed with
.BR XftDrawDestroy ().
The X drawable associated with an
.B XftDraw
can be changed with
.BR XftDrawChange ().
.BR XftDraw s
are internally allocated and freed by
.BR Xft ;
the programmer does not ordinarily need to allocate or free storage
for them.
.TP
.B ""
The X
.BR Display ,
.BR Drawable ,
.BR Colormap ,
and
.BR Visual
of an
.B XftDraw
can be queried with
.BR XftDrawDisplay (),
.BR XftDrawDrawable (),
.BR XftDrawColormap (),
and
.BR XftDrawVisual (),
respectively.
The X Rendering Extension
.B Picture
associated with an
.B XftDraw
is returned by
.BR XftDrawPicture ().
.\" XftDrawSrcPicture
.\" XftDrawGlyphs
.\" XftDrawString*
.\" XftDrawCharSpec
.\" XftDrawCharFontSpec
.\" XftDrawGlyphSpec
.\" XftDrawGlyphFontSpec
.\" XftDrawRect
.\" XftDrawSetClip
.\" XftDrawSetClipRectangles
.\" XftDrawSetSubwindowMode
.TP
.B XftCharSpec
.nf
typedef struct _XftCharSpec {
    FcChar32    ucs4;
    short       x;
    short       y;
} XftCharSpec;
.fi
.TP
.B ""
The
.B FcChar32
data type is defined by the Fontconfig library.
.\" XftDrawCharSpec
.\" XftCharSpecRender
.TP
.B XftCharFontSpec
.nf
typedef struct _XftCharFontSpec {
    XftFont     *font;
    FcChar32    ucs4;
    short       x;
    short       y;
} XftCharFontSpec;
.fi
.TP
.B ""
The
.B FcChar32
data type is defined by the Fontconfig library.
.\" XftDrawCharFontSpec
.\" XftCharFontSpecRender
.TP
.B XftGlyphSpec
.nf
typedef struct _XftGlyphSpec {
    FT_UInt     glyph;
    short       x;
    short       y;
} XftGlyphSpec;
.fi
.TP
.B ""
The
.B FT_UInt
data type is defined by the FreeType library.
.\" XftDrawGlyphSpec
.\" XftGlyphSpecRender
.TP
.B XftGlyphFontSpec
.nf
typedef struct _XftGlyphFontSpec {
    XftFont     *font;
    FT_UInt     glyph;
    short       x;
    short       y;
} XftGlyphFontSpec;
.fi
.TP
.B ""
The
.B FT_UInt
data type is defined by the FreeType library.
.\" XftDrawGlyphFontSpec
.\" XftGlyphFontSpecRender
.SH FUNCTIONS
.SS "Opening and Matching Fonts"
.nf
\fBXftFont *\fR
\fBXftFontOpen (Display *\fIdpy\fB,\fR
\fB             int     \fIscreen\fB,\fR
\fB             ...);\fR\fR
.fi
.B XftFontOpen
takes a list of pattern element triples of the form
.IR field , " type" , " value"
(terminated with a NULL), matches that pattern against the available fonts,
and opens the matching font, sizing it correctly for screen number
.I screen
on display
.IR dpy .
The
.B Display
data type is defined by the X11 library.
Returns NULL if no match is found.
.PP
Example:
.nf
    font = XftFontOpen (dpy, screen,
                        XFT_FAMILY, XftTypeString, "charter",
                        XFT_SIZE, XftTypeDouble, 12.0,
                        NULL);
.fi
This opens the \(lqcharter\(rq font at 12 points.
The point size is automatically converted to the correct pixel size based
on the resolution of the monitor.
.PP
.nf
\fBXftFont *\fR
\fBXftFontOpenName (Display       *\fIdpy\fB,\fR
\fB                 int           \fIscreen\fB,\fR
\fB                 unsigned char *\fIname\fB);\fR
.fi
.B XftFontOpenName
behaves as
.B XftFontOpen
does, except that it takes a Fontconfig pattern string (which is passed to
the Fontconfig library's
.BR FcNameParse ()
function).
.PP
.nf
\fBXftFont *\fR
\fBXftFontOpenXlfd (Display       *\fIdpy\fB,\fR
\fB                 int           \fIscreen\fB,\fR
\fB                 unsigned char *\fIxlfd\fB)\fR
.fi
.B XftFontOpenXlfd
behaves as
.B XftFontOpen
does, except that it takes a string containing an X Logical Font
Description (XLFD).
.PP
.nf
\fBFcPattern *\fR
\fBXftFontMatch (Display   *\fIdpy\fB,\fR
\fB              int       \fIscreen\fB,\fR
\fB              FcPattern *\fIpattern\fB,\fR
\fB              FcResult  *\fIresult\fB);\fR
.fi
Also used internally by the
.BR XftFontOpen *
functions,
.B XftFontMatch
can also be used directly to determine the Fontconfig font pattern
resulting from an Xft font open request.
The
.B FcPattern
and
.B FcResult
data types are defined by the Fontconfig library.
.SS "Determining the Pixel Extents of a Text String"
.nf
\fBvoid\fR
\fBXftTextExtents8 (Display    *\fIdpy\fB,\fR
\fB                 XftFont    *\fIfont\fB,\fR
\fB                 FcChar8    *\fIstring\fB,\fR
\fB                 int        \fIlen\fB,\fR
\fB                 XGlyphInfo *\fIextents\fB);\fR
.fi
.B XftTextExtents8
computes the pixel extents on display
.I dpy
of no more than
.I len
glyphs of a
.I string
consisting of eight-bit characters when drawn with
.IR font ,
storing them in
.IR extents .
The
.B FcChar8
data type is defined by the Fontconfig library, and the
.B XGlyphInfo
data type is defined by the X Rendering Extension library.
.PP
.nf
\fBvoid\fR
\fBXftTextExtents16 (Display    *\fIdpy\fB,\fR
\fB                  XftFont    *\fIfont\fB,\fR
\fB                  FcChar16   *\fIstring\fB,\fR
\fB                  int        \fIlen\fB,\fR
\fB                  XGlyphInfo *\fIextents\fB);\fR
.fi
.B XftTextExtents16
computes the pixel extents on display
.I dpy
of no more than
.I len
glyphs of a
.I string
consisting of sixteen-bit characters when drawn with
.IR font ,
storing them in
.IR extents .
The
.B FcChar16
data type is defined by the Fontconfig library, and the
.B XGlyphInfo
data type is defined by the X Rendering Extension library.
.PP
.nf
\fBvoid\fR
\fBXftTextExtents32 (Display    *\fIdpy\fB,\fR
\fB                  XftFont    *\fIfont\fB,\fR
\fB                  FcChar32   *\fIstring\fB,\fR
\fB                  int        \fIlen\fB,\fR
\fB                  XGlyphInfo *\fIextents\fB);\fR
.fi
.B XftTextExtents32
computes the pixel extents on display
.I dpy
of no more than
.I len
glyphs of a
.I string
consisting of thirty-two-bit characters when drawn with
.IR font ,
storing them in
.IR extents .
The
.B FcChar32
data type is defined by the Fontconfig library, and the
.B XGlyphInfo
data type is defined by the X Rendering Extension library.
.PP
.nf
\fBvoid\fR
\fBXftTextExtentsUtf8 (Display    *\fIdpy\fB,\fR
\fB                    XftFont    *\fIfont\fB,\fR
\fB                    FcChar8    *\fIstring\fB,\fR
\fB                    int        \fIlen\fB,\fR
\fB                    XGlyphInfo *\fIextents\fB);\fR
.fi
.B XftTextExtentsUtf8
computes the pixel extents on display
.I dpy
of no more than
.I len
bytes of a UTF-8 encoded
.I string
when drawn with
.IR font ,
storing them in
.IR extents .
The
.B XGlyphInfo
data type is defined by the X Rendering Extension library.
.PP
.nf
\fBvoid\fR
\fBXftTextExtentsUtf16 (Display    *\fIdpy\fB,\fR
\fB                     XftFont    *\fIfont\fB,\fR
\fB                     FcChar8    *\fIstring\fB,\fR
\fB                     FcEndian   \fIendian\fB,\fR
\fB                     int        \fIlen\fB,\fR
\fB                     XGlyphInfo *\fIextents\fB);\fR
.fi
.B XftTextExtentsUtf16
computes the pixel extents on display
.I dpy
of no more than
.I len
bytes of a UTF-16LE- or UTF-16BE-encoded
.I string
when drawn with
.IR font ,
storing them in
.IR extents .
The endianness of
.I string
must be specified in
.IR endian .
The
.B FcEndian
data type is defined by the Fontconfig library, and the
.B XGlyphInfo
data type is defined by the X Rendering Extension library.
.PP
.nf
\fBvoid\fR
\fBXftGlyphExtents (Display    *\fIdpy\fB,\fR
\fB                 XftFont    *\fIfont\fB,\fR
\fB                 FT_UInt    *\fIglyphs\fB,\fR
\fB                 int        \fInglyphs\fB,\fR
\fB                 XGlyphInfo *\fIextents\fB);\fR
.fi
Also used internally by the
.BR XftTextExtents *
functions,
.B XftGlyphExtents
computes the pixel extents on display
.I dpy
of no more than
.I nglyphs
in the array
.I glyphs
drawn with
.IR font ,
storing them in
.IR extents .
The
.B FT_UInt
data type is defined by the FreeType library, and the
.B XGlyphInfo
data type is defined by the X Rendering Extension library.
.SS "Drawing Strings (and Other Things)"
.nf
\fBXftDraw *\fR
\fBXftDrawCreate (Display  *\fIdpy\fB,\fR
\fB               Drawable \fIdrawable\fB,\fR
\fB               Visual   *\fIvisual\fB,\fR
\fB               Colormap \fIcolormap\fB);\fR
.fi
.B XftDrawCreate
creates a structure that can be used to render text and rectangles using
the specified
.IR drawable ,
.IR visual ,
and
.I colormap
on
.IR display .
The
.BR Drawable ,
.BR Visual ,
and
.B Colormap
data types are defined by the X11 library.
.PP
.nf
\fBXftDraw *\fR
\fBXftDrawCreateBitmap (Display *\fIdpy\fB,\fR
\fB                     Pixmap  \fIbitmap\fB);\fR
.fi
.B XftDrawCreateBitmap
behaves as
.BR XftDrawCreate ,
except it uses an X pixmap of color depth 1 instead of an X drawable.
The
.B Pixmap
data type is defined by the X11 library.
.PP
.nf
\fBXftDraw *\fR
\fBXftDrawCreateAlpha (Display *\fIdpy\fB,\fR
\fB                    Pixmap  \fIpixmap\fB,\fR
\fB                    int     \fIdepth\fB);\fR
.fi
.B XftDrawCreateAlpha
behaves as
.BR XftDrawCreate ,
except it uses an X pixmap of color depth
.I depth
instead of an X drawable.
The
.B Pixmap
data type is defined by the X11 library.
.PP
.nf
\fBvoid\fR
\fBXftDrawChange (XftDraw  *\fIdraw\fB,\fR
\fB               Drawable \fIdrawable\fB);\fR
.fi
.B XftDrawChange
changes the X drawable association of the existing Xft draw object
.I draw
from its current value to
.IR drawable .
.PP
.nf
\fBDisplay *\fR
\fBXftDrawDisplay (XftDraw *\fIdraw\fB);\fR
.fi
.B XftDrawDisplay
returns a pointer to the display associated with the Xft draw object
.IR draw .
.PP
.nf
\fBDrawable\fR
\fBXftDrawDrawable (XftDraw *\fIdraw\fB);\fR
.fi
.B XftDrawDrawable
returns the X drawable associated with the Xft draw object
.IR draw .
.PP
.nf
\fBColormap\fR
\fBXftDrawColormap (XftDraw *\fIdraw\fB);\fR
.fi
.B XftDrawColormap
returns the colormap associatied with the Xft draw object
.IR draw .
.PP
.nf
\fBVisual *\fR
\fBXftDrawVisual (XftDraw *\fIdraw\fB);\fR
.fi
.B XftDrawVisual
returns a pointer to the visual associated with the Xft draw object
.IR draw .
.PP
.nf
\fBPicture\fR
\fBXftDrawPicture (XftDraw *\fIdraw\fB);\fR
.fi
.B XftDrawPicture
returns the picture associated with the Xft draw object
.IR draw .
If the the X server does not support the X Rendering Extension, 0 is
returned.
.PP
.nf
\fBPicture\fR
\fBXftDrawSrcPicture (XftDraw *\fIdraw\fB,\fR
\fB                   XftColor *\fIcolor\fB);\fR
.fi
.\" Unfortunately, I'm not quite sure what this does.  I think it is the gizmo
.\" that is used to create an Xrender Picture object so that glyphs can be
.\" drawn in the XftDraw object
.\" .I draw
.\" using the specified
.\" .IR color .
.\" -- BR, 2005-04-02
This function is never called if the X server doesn't support the X
Rendering Extension; instead,
.B XftGlyphCore
is used.
.PP
.nf
\fBvoid\fR
\fBXftDrawDestroy (XftDraw *\fIdraw\fB);\fR
.fi
.B XftDrawDestroy
destroys
.I draw
(created by one of the
.B XftCreate
functions) and frees the memory that was allocated for it.
.PP
.nf
\fBvoid\fR
\fBXftDrawString8 (XftDraw         *\fId\fB,\fR
\fB                XftColor        *\fIcolor\fB,\fR
\fB                XftFont         *\fIfont\fB,\fR
\fB                int             \fIx\fB,\fR
\fB                int             \fIy\fB,\fR
\fB                unsigned char   *\fIstring\fB,\fR
\fB                int             \fIlen\fB);\fR
.fi
.B XftDrawString8
draws no more than
.I len
glyphs of
.I string
to Xft drawable
.I d
using
.I font
in
.I color
at position
.IR x , " y" .
.PP
.nf
\fBvoid\fR
\fBXftDrawRect (XftDraw        *\fId\fB,\fR
\fB             XftColor       *\fIcolor\fB,\fR
\fB             int            \fIx\fB,\fR
\fB             int            \fIy\fB,\fR
\fB             unsigned int   \fIwidth\fB,\fR
\fB             unsigned int   \fIheight\fB);\fR
.fi
.B XftDrawRect
draws a solid rectangle of the specified
.IR color ,
.IR width ,
and
.I height
at position
.IR x , " y"
to Xft drawable
.IR d .
.SH COMPATIBILITY
As of version 2,
.B Xft
has become relatively stable and is expected to retain source and binary
compatibility in future releases.
.PP
.B Xft
does provide a compatibility interface to its previous major version,
Xft
.RI 1. x ,
described below.
.SS "Xft 1.x Compatibility Header File"
.B #include <X11/Xft/XftCompat.h>
.\" .SS "Xft 1.x Compatibility Constants"
.SS "Xft 1.x Compatibility Data Types"
.TP
.B XftPattern
holds a set of names with associated value lists; each name refers to a
property of a font.
.BR XftPattern s
are used as inputs to the matching code as well as holding information
about specific fonts.
.TP
.B XftFontSet
contains a list of
.BR XftPattern s.
Internally,
.B Xft
uses this data structure to hold sets of fonts.
Externally,
.B Xft
returns the results of listing fonts in this format.
.TP
.B XftObjectSet
holds a set of names and is used to specify which fields from fonts are
placed in the the list of returned patterns when listing fonts.
.\" .SS "Xft 1.x Compatibility Functions"
.SH AUTHOR
Keith Packard
.SH "SEE ALSO"
.I Fontconfig Developers Reference
.br
.I FreeType API Reference
.br
.I Xlib \- C Language Interface
.\" Set Vim modeline; textwidth is 70 to account for the extra margin
.\" padding that man (on Debian GNU/Linux) does for output to
.\" terminals (7 spaces on the left, 2 on the right), so that we don't
.\" go past 80 columns total, particularly in .nf/.fi regions.
.\" vim:set ai et sts=4 sw=4 tw=70: