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