(xftfont_open): Don't call FcConfigSubstitute and
[bpt/emacs.git] / src / xftfont.c
1 /* xftfont.c -- XFT font driver.
2 Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
3 Copyright (C) 2006, 2007, 2008
4 National Institute of Advanced Industrial Science and Technology (AIST)
5 Registration Number H13PRO009
6
7 This file is part of GNU Emacs.
8
9 GNU Emacs is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 GNU Emacs is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21
22 #include <config.h>
23 #include <stdio.h>
24 #include <X11/Xlib.h>
25 #include <X11/Xft/Xft.h>
26
27 #include "lisp.h"
28 #include "dispextern.h"
29 #include "xterm.h"
30 #include "frame.h"
31 #include "blockinput.h"
32 #include "character.h"
33 #include "charset.h"
34 #include "fontset.h"
35 #include "font.h"
36 #include "ftfont.h"
37
38 /* Xft font driver. */
39
40 static Lisp_Object Qxft;
41 static Lisp_Object QChinting , QCautohint, QChintstyle, QCrgba, QCembolden;
42
43 /* The actual structure for Xft font that can be casted to struct
44 font. */
45
46 struct xftfont_info
47 {
48 struct font font;
49 Display *display;
50 int screen;
51 XftFont *xftfont;
52 #ifdef HAVE_LIBOTF
53 int maybe_otf; /* Flag to tell if this may be OTF or not. */
54 OTF *otf;
55 #endif /* HAVE_LIBOTF */
56 };
57
58 /* Structure pointed by (struct face *)->extra */
59
60 struct xftface_info
61 {
62 XftColor xft_fg; /* color for face->foreground */
63 XftColor xft_bg; /* color for face->background */
64 };
65
66 static void xftfont_get_colors P_ ((FRAME_PTR, struct face *, GC gc,
67 struct xftface_info *,
68 XftColor *fg, XftColor *bg));
69
70
71 /* Setup foreground and background colors of GC into FG and BG. If
72 XFTFACE_INFO is not NULL, reuse the colors in it if possible. BG
73 may be NULL. */
74
75 static void
76 xftfont_get_colors (f, face, gc, xftface_info, fg, bg)
77 FRAME_PTR f;
78 struct face *face;
79 GC gc;
80 struct xftface_info *xftface_info;
81 XftColor *fg, *bg;
82 {
83 if (xftface_info && face->gc == gc)
84 {
85 *fg = xftface_info->xft_fg;
86 if (bg)
87 *bg = xftface_info->xft_bg;
88 }
89 else
90 {
91 XGCValues xgcv;
92 int fg_done = 0, bg_done = 0;
93
94 BLOCK_INPUT;
95 XGetGCValues (FRAME_X_DISPLAY (f), gc,
96 GCForeground | GCBackground, &xgcv);
97 if (xftface_info)
98 {
99 if (xgcv.foreground == face->foreground)
100 *fg = xftface_info->xft_fg, fg_done = 1;
101 else if (xgcv.foreground == face->background)
102 *fg = xftface_info->xft_bg, fg_done = 1;
103 if (! bg)
104 bg_done = 1;
105 else if (xgcv.background == face->background)
106 *bg = xftface_info->xft_bg, bg_done = 1;
107 else if (xgcv.background == face->foreground)
108 *bg = xftface_info->xft_fg, bg_done = 1;
109 }
110
111 if (fg_done + bg_done < 2)
112 {
113 XColor colors[2];
114
115 colors[0].pixel = fg->pixel = xgcv.foreground;
116 if (bg)
117 colors[1].pixel = bg->pixel = xgcv.background;
118 XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), colors,
119 bg ? 2 : 1);
120 fg->color.alpha = 0xFFFF;
121 fg->color.red = colors[0].red;
122 fg->color.green = colors[0].green;
123 fg->color.blue = colors[0].blue;
124 if (bg)
125 {
126 bg->color.alpha = 0xFFFF;
127 bg->color.red = colors[1].red;
128 bg->color.green = colors[1].green;
129 bg->color.blue = colors[1].blue;
130 }
131 }
132 UNBLOCK_INPUT;
133 }
134 }
135
136
137 static Lisp_Object xftfont_list P_ ((Lisp_Object, Lisp_Object));
138 static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object));
139 static Lisp_Object xftfont_open P_ ((FRAME_PTR, Lisp_Object, int));
140 static void xftfont_close P_ ((FRAME_PTR, struct font *));
141 static int xftfont_prepare_face P_ ((FRAME_PTR, struct face *));
142 static void xftfont_done_face P_ ((FRAME_PTR, struct face *));
143 static unsigned xftfont_encode_char P_ ((struct font *, int));
144 static int xftfont_text_extents P_ ((struct font *, unsigned *, int,
145 struct font_metrics *));
146 static int xftfont_draw P_ ((struct glyph_string *, int, int, int, int, int));
147
148 static int xftfont_anchor_point P_ ((struct font *, unsigned, int,
149 int *, int *));
150 static int xftfont_end_for_frame P_ ((FRAME_PTR f));
151
152 struct font_driver xftfont_driver;
153
154 static Lisp_Object
155 xftfont_list (frame, spec)
156 Lisp_Object frame;
157 Lisp_Object spec;
158 {
159 Lisp_Object list = ftfont_driver.list (frame, spec), tail;
160
161 for (tail = list; CONSP (tail); tail = XCDR (tail))
162 ASET (XCAR (tail), FONT_TYPE_INDEX, Qxft);
163 return list;
164 }
165
166 static Lisp_Object
167 xftfont_match (frame, spec)
168 Lisp_Object frame;
169 Lisp_Object spec;
170 {
171 Lisp_Object entity = ftfont_driver.match (frame, spec);
172
173 if (! NILP (entity))
174 ASET (entity, FONT_TYPE_INDEX, Qxft);
175 return entity;
176 }
177
178 extern Lisp_Object ftfont_font_format P_ ((FcPattern *, Lisp_Object));
179 extern Lisp_Object QCantialias;
180
181 static FcChar8 ascii_printable[95];
182
183 static Lisp_Object
184 xftfont_open (f, entity, pixel_size)
185 FRAME_PTR f;
186 Lisp_Object entity;
187 int pixel_size;
188 {
189 FcResult result;
190 Display *display = FRAME_X_DISPLAY (f);
191 Lisp_Object val, filename, tail, font_object;
192 FcPattern *pat = NULL, *match;
193 struct xftfont_info *xftfont_info = NULL;
194 struct font *font;
195 double size = 0;
196 XftFont *xftfont = NULL;
197 int spacing;
198 char name[256];
199 int len, i;
200 XGlyphInfo extents;
201 FT_Face ft_face;
202
203 val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
204 if (! CONSP (val))
205 return Qnil;
206 val = XCDR (val);
207 filename = XCAR (val);
208 size = XINT (AREF (entity, FONT_SIZE_INDEX));
209 if (size == 0)
210 size = pixel_size;
211 pat = FcPatternCreate ();
212 FcPatternAddInteger (pat, FC_WEIGHT, FONT_WEIGHT_NUMERIC (entity));
213 i = FONT_SLANT_NUMERIC (entity) - 100;
214 if (i < 0) i = 0;
215 FcPatternAddInteger (pat, FC_SLANT, i);
216 FcPatternAddInteger (pat, FC_WIDTH, FONT_WIDTH_NUMERIC (entity));
217 FcPatternAddDouble (pat, FC_PIXEL_SIZE, pixel_size);
218 val = AREF (entity, FONT_FAMILY_INDEX);
219 if (! NILP (val))
220 FcPatternAddString (pat, FC_FAMILY, (FcChar8 *) SDATA (SYMBOL_NAME (val)));
221 val = AREF (entity, FONT_FOUNDRY_INDEX);
222 if (! NILP (val))
223 FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) SDATA (SYMBOL_NAME (val)));
224 val = AREF (entity, FONT_SPACING_INDEX);
225 if (! NILP (val))
226 FcPatternAddInteger (pat, FC_SPACING, XINT (val));
227 val = AREF (entity, FONT_DPI_INDEX);
228 if (! NILP (val))
229 {
230 double dbl = XINT (val);
231
232 FcPatternAddDouble (pat, FC_DPI, dbl);
233 }
234 val = AREF (entity, FONT_AVGWIDTH_INDEX);
235 if (INTEGERP (val) && XINT (val) == 0)
236 FcPatternAddBool (pat, FC_SCALABLE, FcTrue);
237
238 for (tail = AREF (entity, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail))
239 {
240 Lisp_Object key, val;
241
242 key = XCAR (XCAR (tail)), val = XCDR (XCAR (tail));
243 if (EQ (key, QCantialias))
244 FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue);
245 else if (EQ (key, QChinting))
246 FcPatternAddBool (pat, FC_HINTING, NILP (val) ? FcFalse : FcTrue);
247 else if (EQ (key, QCautohint))
248 FcPatternAddBool (pat, FC_AUTOHINT, NILP (val) ? FcFalse : FcTrue);
249 else if (EQ (key, QChintstyle))
250 {
251 if (INTEGERP (val))
252 FcPatternAddInteger (pat, FC_RGBA, XINT (val));
253 }
254 else if (EQ (key, QCrgba))
255 {
256 if (INTEGERP (val))
257 FcPatternAddInteger (pat, FC_RGBA, XINT (val));
258 }
259 #ifdef FC_EMBOLDEN
260 else if (EQ (key, QCembolden))
261 FcPatternAddBool (pat, FC_EMBOLDEN, NILP (val) ? FcFalse : FcTrue);
262 #endif
263 }
264
265 BLOCK_INPUT;
266 match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
267 FcPatternDestroy (pat);
268 FcPatternDel (match, FC_FILE);
269 FcPatternAddString (match, FC_FILE, (FcChar8 *) SDATA (filename));
270 xftfont = XftFontOpenPattern (display, match);
271 UNBLOCK_INPUT;
272
273 if (! xftfont)
274 return Qnil;
275 /* We should not destroy PAT here because it is kept in XFTFONT and
276 destroyed automatically when XFTFONT is closed. */
277 font_object = font_make_object (VECSIZE (struct xftfont_info));
278 ASET (font_object, FONT_TYPE_INDEX, Qxft);
279 for (i = 1; i < FONT_ENTITY_MAX; i++)
280 ASET (font_object, i, AREF (entity, i));
281 ASET (font_object, FONT_SIZE_INDEX, make_number (size));
282 len = font_unparse_xlfd (entity, size, name, 256);
283 if (len > 0)
284 ASET (font_object, FONT_NAME_INDEX, make_unibyte_string (name, len));
285 len = font_unparse_fcname (entity, size, name, 256);
286 if (len > 0)
287 ASET (font_object, FONT_FULLNAME_INDEX, make_unibyte_string (name, len));
288 else
289 ASET (font_object, FONT_FULLNAME_INDEX,
290 AREF (font_object, FONT_NAME_INDEX));
291 ASET (font_object, FONT_FILE_INDEX, filename);
292 ASET (font_object, FONT_FORMAT_INDEX,
293 ftfont_font_format (xftfont->pattern, filename));
294 font = XFONT_OBJECT (font_object);
295 font->pixel_size = pixel_size;
296 font->driver = &xftfont_driver;
297 font->encoding_charset = font->repertory_charset = -1;
298
299 xftfont_info = (struct xftfont_info *) font;
300 xftfont_info->display = display;
301 xftfont_info->screen = FRAME_X_SCREEN_NUMBER (f);
302 xftfont_info->xftfont = xftfont;
303 font->pixel_size = size;
304 font->driver = &xftfont_driver;
305 if (INTEGERP (AREF (entity, FONT_SPACING_INDEX)))
306 spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
307 else
308 spacing = FC_PROPORTIONAL;
309 if (! ascii_printable[0])
310 {
311 int i;
312 for (i = 0; i < 95; i++)
313 ascii_printable[i] = ' ' + i;
314 }
315 BLOCK_INPUT;
316 if (spacing != FC_PROPORTIONAL)
317 {
318 font->min_width = font->average_width = font->space_width
319 = xftfont->max_advance_width;
320 XftTextExtents8 (display, xftfont, ascii_printable + 1, 94, &extents);
321 }
322 else
323 {
324 XftTextExtents8 (display, xftfont, ascii_printable, 1, &extents);
325 font->space_width = extents.xOff;
326 if (font->space_width <= 0)
327 /* dirty workaround */
328 font->space_width = pixel_size;
329 XftTextExtents8 (display, xftfont, ascii_printable + 1, 94, &extents);
330 font->average_width = (font->space_width + extents.xOff) / 95;
331 }
332 UNBLOCK_INPUT;
333
334 font->ascent = xftfont->ascent;
335 font->descent = xftfont->descent;
336 if (pixel_size >= 5)
337 {
338 /* The above condition is a dirty workaround because
339 XftTextExtents8 behaves strangely for some fonts
340 (e.g. "Dejavu Sans Mono") when pixel_size is less than 5. */
341 if (font->ascent < extents.y)
342 font->ascent = extents.y;
343 if (font->descent < extents.height - extents.y)
344 font->descent = extents.height - extents.y;
345 }
346 font->height = font->ascent + font->descent;
347
348 ft_face = XftLockFace (xftfont);
349 if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0)
350 {
351 int upEM = ft_face->units_per_EM;
352
353 font->underline_position = -ft_face->underline_position * size / upEM;
354 font->underline_thickness = -ft_face->underline_thickness * size / upEM;
355 if (font->underline_thickness > 2)
356 font->underline_position -= font->underline_thickness / 2;
357 }
358 else
359 {
360 font->underline_position = -1;
361 font->underline_thickness = 0;
362 }
363 #ifdef HAVE_LIBOTF
364 xftfont_info->maybe_otf = ft_face->face_flags & FT_FACE_FLAG_SFNT;
365 xftfont_info->otf = NULL;
366 #endif /* HAVE_LIBOTF */
367 XftUnlockFace (xftfont);
368
369 /* Unfortunately Xft doesn't provide a way to get minimum char
370 width. So, we use space_width instead. */
371 font->min_width = font->space_width;
372
373 font->baseline_offset = 0;
374 font->relative_compose = 0;
375 font->default_ascent = 0;
376 font->vertical_centering = 0;
377
378 return font_object;
379 }
380
381 static void
382 xftfont_close (f, font)
383 FRAME_PTR f;
384 struct font *font;
385 {
386 struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
387
388 #ifdef HAVE_LIBOTF
389 if (xftfont_info->otf)
390 OTF_close (xftfont_info->otf);
391 #endif
392 BLOCK_INPUT;
393 XftFontClose (xftfont_info->display, xftfont_info->xftfont);
394 UNBLOCK_INPUT;
395 }
396
397 static int
398 xftfont_prepare_face (f, face)
399 FRAME_PTR f;
400 struct face *face;
401 {
402 struct xftface_info *xftface_info;
403
404 #if 0
405 /* This doesn't work if face->ascii_face doesn't use an Xft font. */
406 if (face != face->ascii_face)
407 {
408 face->extra = face->ascii_face->extra;
409 return 0;
410 }
411 #endif
412
413 xftface_info = malloc (sizeof (struct xftface_info));
414 if (! xftface_info)
415 return -1;
416 xftfont_get_colors (f, face, face->gc, NULL,
417 &xftface_info->xft_fg, &xftface_info->xft_bg);
418 face->extra = xftface_info;
419 return 0;
420 }
421
422 static void
423 xftfont_done_face (f, face)
424 FRAME_PTR f;
425 struct face *face;
426 {
427 struct xftface_info *xftface_info;
428
429 #if 0
430 /* This doesn't work if face->ascii_face doesn't use an Xft font. */
431 if (face != face->ascii_face
432 || ! face->extra)
433 return;
434 #endif
435
436 xftface_info = (struct xftface_info *) face->extra;
437 if (xftface_info)
438 {
439 free (xftface_info);
440 face->extra = NULL;
441 }
442 }
443
444 static unsigned
445 xftfont_encode_char (font, c)
446 struct font *font;
447 int c;
448 {
449 struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
450 unsigned code = XftCharIndex (xftfont_info->display, xftfont_info->xftfont,
451 (FcChar32) c);
452
453 return (code ? code : FONT_INVALID_CODE);
454 }
455
456 static int
457 xftfont_text_extents (font, code, nglyphs, metrics)
458 struct font *font;
459 unsigned *code;
460 int nglyphs;
461 struct font_metrics *metrics;
462 {
463 struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
464 XGlyphInfo extents;
465
466 BLOCK_INPUT;
467 XftGlyphExtents (xftfont_info->display, xftfont_info->xftfont, code, nglyphs,
468 &extents);
469 UNBLOCK_INPUT;
470 if (metrics)
471 {
472 metrics->lbearing = - extents.x;
473 metrics->rbearing = - extents.x + extents.width;
474 metrics->width = extents.xOff;
475 metrics->ascent = extents.y;
476 metrics->descent = extents.height - extents.y;
477 }
478 return extents.xOff;
479 }
480
481 static XftDraw *
482 xftfont_get_xft_draw (f)
483 FRAME_PTR f;
484 {
485 XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);;
486
487 if (! xft_draw)
488 {
489 BLOCK_INPUT;
490 xft_draw= XftDrawCreate (FRAME_X_DISPLAY (f),
491 FRAME_X_WINDOW (f),
492 FRAME_X_VISUAL (f),
493 FRAME_X_COLORMAP (f));
494 UNBLOCK_INPUT;
495 if (! xft_draw)
496 abort ();
497 font_put_frame_data (f, &xftfont_driver, xft_draw);
498 }
499 return xft_draw;
500 }
501
502 static int
503 xftfont_draw (s, from, to, x, y, with_background)
504 struct glyph_string *s;
505 int from, to, x, y, with_background;
506 {
507 FRAME_PTR f = s->f;
508 struct face *face = s->face;
509 struct xftfont_info *xftfont_info = (struct xftfont_info *) s->font;
510 struct xftface_info *xftface_info = NULL;
511 XftDraw *xft_draw = xftfont_get_xft_draw (f);
512 FT_UInt *code;
513 XftColor fg, bg;
514 int len = to - from;
515 int i;
516
517 if (s->font == face->font)
518 xftface_info = (struct xftface_info *) face->extra;
519 xftfont_get_colors (f, face, s->gc, xftface_info,
520 &fg, with_background ? &bg : NULL);
521 BLOCK_INPUT;
522 if (s->num_clips > 0)
523 XftDrawSetClipRectangles (xft_draw, 0, 0, s->clip, s->num_clips);
524 else
525 XftDrawSetClip (xft_draw, NULL);
526
527 if (with_background)
528 XftDrawRect (xft_draw, &bg,
529 x, y - face->font->ascent, s->width, face->font->height);
530 code = alloca (sizeof (FT_UInt) * len);
531 for (i = 0; i < len; i++)
532 code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
533 | XCHAR2B_BYTE2 (s->char2b + from + i));
534
535 if (s->padding_p)
536 for (i = 0; i < len; i++)
537 XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont,
538 x + i, y, code + i, 1);
539 else
540 XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont,
541 x, y, code, len);
542 UNBLOCK_INPUT;
543
544 return len;
545 }
546
547 static int
548 xftfont_anchor_point (font, code, index, x, y)
549 struct font *font;
550 unsigned code;
551 int index;
552 int *x, *y;
553 {
554 struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
555 FT_Face ft_face = XftLockFace (xftfont_info->xftfont);
556 int result;
557
558 if (FT_Load_Glyph (ft_face, code, FT_LOAD_DEFAULT) != 0)
559 result = -1;
560 else if (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE)
561 result = -1;
562 else if (index >= ft_face->glyph->outline.n_points)
563 result = -1;
564 else
565 {
566 *x = ft_face->glyph->outline.points[index].x;
567 *y = ft_face->glyph->outline.points[index].y;
568 }
569 XftUnlockFace (xftfont_info->xftfont);
570 return result;
571 }
572
573 static int
574 xftfont_end_for_frame (f)
575 FRAME_PTR f;
576 {
577 XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);
578
579 if (xft_draw)
580 {
581 BLOCK_INPUT;
582 XftDrawDestroy (xft_draw);
583 UNBLOCK_INPUT;
584 font_put_frame_data (f, &xftfont_driver, NULL);
585 }
586 return 0;
587 }
588
589 #ifdef HAVE_LIBOTF
590 #ifdef HAVE_M17N_FLT
591 static Lisp_Object
592 xftfont_shape (lgstring)
593 Lisp_Object lgstring;
594 {
595 struct font *font;
596 struct xftfont_info *xftfont_info;
597 Lisp_Object result;
598 FT_Face ft_face;
599
600 CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
601 xftfont_info = (struct xftfont_info *) font;
602 if (! xftfont_info->maybe_otf)
603 return Qnil;
604 ft_face = XftLockFace (xftfont_info->xftfont);
605 if (! xftfont_info->otf)
606 {
607 OTF *otf = OTF_open_ft_face (ft_face);
608
609 if (! otf || OTF_get_table (otf, "head") < 0)
610 {
611 if (otf)
612 OTF_close (otf);
613 xftfont_info->maybe_otf = 0;
614 XftUnlockFace (xftfont_info->xftfont);
615 return Qnil;
616 }
617 xftfont_info->otf = otf;
618 }
619
620 result = ftfont_shape_by_flt (lgstring, font, ft_face, xftfont_info->otf);
621 XftUnlockFace (xftfont_info->xftfont);
622 return result;
623 }
624 #endif /* HAVE_M17N_FLT */
625 #endif /* HAVE_LIBOTF */
626
627 void
628 syms_of_xftfont ()
629 {
630 DEFSYM (Qxft, "xft");
631 DEFSYM (QChinting, ":hinting");
632 DEFSYM (QCautohint, ":autohing");
633 DEFSYM (QChintstyle, ":hintstyle");
634 DEFSYM (QCrgba, ":rgba");
635 DEFSYM (QCembolden, ":embolden");
636
637 xftfont_driver = ftfont_driver;
638 xftfont_driver.type = Qxft;
639 xftfont_driver.get_cache = xfont_driver.get_cache;
640 xftfont_driver.list = xftfont_list;
641 xftfont_driver.match = xftfont_match;
642 xftfont_driver.open = xftfont_open;
643 xftfont_driver.close = xftfont_close;
644 xftfont_driver.prepare_face = xftfont_prepare_face;
645 xftfont_driver.done_face = xftfont_done_face;
646 xftfont_driver.encode_char = xftfont_encode_char;
647 xftfont_driver.text_extents = xftfont_text_extents;
648 xftfont_driver.draw = xftfont_draw;
649 xftfont_driver.anchor_point = xftfont_anchor_point;
650 xftfont_driver.end_for_frame = xftfont_end_for_frame;
651 #ifdef HAVE_LIBOTF
652 #ifdef HAVE_M17N_FLT
653 xftfont_driver.shape = xftfont_shape;
654 #endif /* HAVE_M17N_FLT */
655 #endif /* HAVE_LIBOTF */
656
657 register_font_driver (&xftfont_driver, NULL);
658 }
659
660 /* arch-tag: 64ec61bf-7c8e-4fe6-b953-c6a85d5e1605
661 (do not change this comment) */