summaryrefslogtreecommitdiff
path: root/src/ftfont.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-11-14 14:00:07 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-11-14 14:02:03 -0800
commit2241f7ca7adb8aa7d785174dec0280a07cd16479 (patch)
tree596070d1698863b211c021c5b195a6094070949c /src/ftfont.c
parent6a2a371c288a13060c44fa1af3ab73db611705a4 (diff)
downloademacs-2241f7ca7adb8aa7d785174dec0280a07cd16479.tar.gz
In Cairo builds, omit some unnecessary functions
* src/font.c (fset_font_data, font_put_frame_data) (font_get_frame_data): * src/ftfont.c (ftfont_open, ftfont_close) (ftfont_encode_char, ftfont_glyph_metrics) (ftfont_text_extents, ftfont_driver): Define only if USE_CAIRO. * src/xdisp.c (tty_handle_tab_bar_click): Define only if HAVE_NTGUI && !CYGWIN.
Diffstat (limited to 'src/ftfont.c')
-rw-r--r--src/ftfont.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ftfont.c b/src/ftfont.c
index 77a4cf5de5c..d649c991dd6 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1264,6 +1264,8 @@ ftfont_entity_pattern (Lisp_Object entity, int pixel_size)
return pat;
}
+#ifndef USE_CAIRO
+
Lisp_Object
ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
{
@@ -1459,6 +1461,8 @@ ftfont_close (struct font *font)
FT_Done_Size (ftfont_info->ft_size);
}
+#endif /* !USE_CAIRO */
+
int
ftfont_has_char (Lisp_Object font, int c)
{
@@ -1489,6 +1493,8 @@ ftfont_has_char (Lisp_Object font, int c)
}
}
+#ifndef USE_CAIRO
+
unsigned
ftfont_encode_char (struct font *font, int c)
{
@@ -1560,6 +1566,8 @@ ftfont_text_extents (struct font *font, const unsigned int *code,
metrics->width = width;
}
+#endif /* !USE_CAIRO */
+
int
ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bitmap, int bits_per_pixel)
{
@@ -3031,6 +3039,8 @@ ftfont_combining_capability (struct font *font)
static void syms_of_ftfont_for_pdumper (void);
+#ifndef USE_CAIRO
+
static struct font_driver const ftfont_driver =
{
/* We can't draw a text without device dependent functions. */
@@ -3059,6 +3069,8 @@ static struct font_driver const ftfont_driver =
.combining_capability = ftfont_combining_capability,
};
+#endif /* !USE_CAIRO */
+
void
syms_of_ftfont (void)
{