From f507537736f08249486a8f6d3c8b7401dd4e0b0d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Jul 2014 16:35:31 -0700 Subject: [PATCH] * font.c, font.h (font_unparse_fcname): Now static. Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS. --- src/ChangeLog | 5 +++++ src/font.c | 11 +++++++++-- src/font.h | 2 -- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fa79ac43bdf..ceddf35450d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-07-09 Paul Eggert + + * font.c, font.h (font_unparse_fcname): Now static. + Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS. + 2014-07-09 Dmitry Antipov Next minor cleanup of font subsystem. diff --git a/src/font.c b/src/font.c index 0a204cf0eea..b3afee09864 100644 --- a/src/font.c +++ b/src/font.c @@ -227,6 +227,8 @@ font_make_object (int size, Lisp_Object entity, int pixelsize) #if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS) +static int font_unparse_fcname (Lisp_Object, int, char *, int); + /* Like above, but also set `type', `name' and `fullname' properties of font-object. */ @@ -1599,11 +1601,14 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font) return 0; } +#if defined HAVE_XFT || defined HAVE_FREETYPE || defined HAVE_NS + /* Store fontconfig's font name of FONT (font-spec or font-entity) in NAME (NBYTES length), and return the name length. If - FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ + FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. + Return a negative value on error. */ -int +static int font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) { Lisp_Object family, foundry; @@ -1724,6 +1729,8 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) return (p - name); } +#endif + /* Parse NAME (null terminated) and store information in FONT (font-spec or font-entity). If NAME is successfully parsed, return 0. Otherwise return -1. */ diff --git a/src/font.h b/src/font.h index 5bf0efb738a..cffc035cd49 100644 --- a/src/font.h +++ b/src/font.h @@ -752,8 +752,6 @@ extern void font_parse_family_registry (Lisp_Object family, extern int font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font); extern ptrdiff_t font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int bytes); -extern int font_unparse_fcname (Lisp_Object font, int pixel_size, - char *name, int bytes); extern void register_font_driver (struct font_driver *driver, struct frame *f); extern void free_font_driver_list (struct frame *f); #ifdef ENABLE_CHECKING -- 2.39.5