aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2014-07-09 16:35:31 -0700
committerPaul Eggert2014-07-09 16:35:31 -0700
commitf507537736f08249486a8f6d3c8b7401dd4e0b0d (patch)
tree09463b4c475fd0d04c7a3fb05efc76c96b03fe33
parent140ea213dbb3760cbd16304c102e8d154a75a239 (diff)
downloademacs-f507537736f08249486a8f6d3c8b7401dd4e0b0d.tar.gz
emacs-f507537736f08249486a8f6d3c8b7401dd4e0b0d.zip
* font.c, font.h (font_unparse_fcname): Now static.
Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.c11
-rw-r--r--src/font.h2
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 @@
12014-07-09 Paul Eggert <eggert@cs.ucla.edu>
2
3 * font.c, font.h (font_unparse_fcname): Now static.
4 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
5
12014-07-09 Dmitry Antipov <dmantipov@yandex.ru> 62014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
2 7
3 Next minor cleanup of font subsystem. 8 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)
227 227
228#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS) 228#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS)
229 229
230static int font_unparse_fcname (Lisp_Object, int, char *, int);
231
230/* Like above, but also set `type', `name' and `fullname' properties 232/* Like above, but also set `type', `name' and `fullname' properties
231 of font-object. */ 233 of font-object. */
232 234
@@ -1599,11 +1601,14 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font)
1599 return 0; 1601 return 0;
1600} 1602}
1601 1603
1604#if defined HAVE_XFT || defined HAVE_FREETYPE || defined HAVE_NS
1605
1602/* Store fontconfig's font name of FONT (font-spec or font-entity) in 1606/* Store fontconfig's font name of FONT (font-spec or font-entity) in
1603 NAME (NBYTES length), and return the name length. If 1607 NAME (NBYTES length), and return the name length. If
1604 FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ 1608 FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead.
1609 Return a negative value on error. */
1605 1610
1606int 1611static int
1607font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) 1612font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1608{ 1613{
1609 Lisp_Object family, foundry; 1614 Lisp_Object family, foundry;
@@ -1724,6 +1729,8 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1724 return (p - name); 1729 return (p - name);
1725} 1730}
1726 1731
1732#endif
1733
1727/* Parse NAME (null terminated) and store information in FONT 1734/* Parse NAME (null terminated) and store information in FONT
1728 (font-spec or font-entity). If NAME is successfully parsed, return 1735 (font-spec or font-entity). If NAME is successfully parsed, return
1729 0. Otherwise return -1. */ 1736 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,
752extern int font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font); 752extern int font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font);
753extern ptrdiff_t font_unparse_xlfd (Lisp_Object font, int pixel_size, 753extern ptrdiff_t font_unparse_xlfd (Lisp_Object font, int pixel_size,
754 char *name, int bytes); 754 char *name, int bytes);
755extern int font_unparse_fcname (Lisp_Object font, int pixel_size,
756 char *name, int bytes);
757extern void register_font_driver (struct font_driver *driver, struct frame *f); 755extern void register_font_driver (struct font_driver *driver, struct frame *f);
758extern void free_font_driver_list (struct frame *f); 756extern void free_font_driver_list (struct frame *f);
759#ifdef ENABLE_CHECKING 757#ifdef ENABLE_CHECKING