Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'. * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it. * docs/CHANGES: Updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
diff --git a/ChangeLog b/ChangeLog
index 1b6cc00..8c5e281 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2015-03-11 Werner Lemberg <wl@gnu.org>
+ [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
+
+ * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
+
+ * docs/CHANGES: Updated.
+
+2015-03-11 Werner Lemberg <wl@gnu.org>
+
Fix automatic copyright updating.
* src/tools/update-copyright: Make scanning of `no-copyright'
diff --git a/docs/CHANGES b/docs/CHANGES
index 02dd5bd..17fe4bc 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -34,10 +34,15 @@ CHANGES BETWEEN 2.5.5 and 2.6
This change doesn't break the ABI; however, it might cause
compiler warnings.
- - Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init',
- since this name better reflects its function. For backwards
+ - Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init',
+ since this name better reflects its function. For backwards
compatibility, the old function name is still available.
+ - Function `FT_Get_X11_Font_Format' has been renamed to
+ `FT_Get_Font_Format', since this name better reflects its
+ function. For backwards compatibility, the old function name is
+ still available.
+
======================================================================
diff --git a/include/ftfntfmt.h b/include/ftfntfmt.h
index c1bf146..b3e65e3 100644
--- a/include/ftfntfmt.h
+++ b/include/ftfntfmt.h
@@ -2,7 +2,7 @@
/* */
/* ftfntfmt.h */
/* */
-/* Support functions for X11. */
+/* Support functions for font formats. */
/* */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -49,22 +49,20 @@ FT_BEGIN_HEADER
/* however, there are special cases (like in PDF devices) where it is */
/* important to differentiate, in spite of FreeType's uniform API. */
/* */
- /* This function is in the X11/xf86 namespace for historical reasons */
- /* and in no way depends on that windowing system. */
- /* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Function> */
- /* FT_Get_X11_Font_Format */
+ /* FT_Get_Font_Format */
/* */
/* <Description> */
- /* Return a string describing the format of a given face, using values */
- /* that can be used as an X11 FONT_PROPERTY. Possible values are */
- /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
- /* `PFR', and `Windows~FNT'. */
+ /* Return a string describing the format of a given face. Possible */
+ /* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */
+ /* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */
+ /* */
+ /* The return value is suitable to be used as an X11 FONT_PROPERTY. */
/* */
/* <Input> */
/* face :: */
@@ -73,9 +71,19 @@ FT_BEGIN_HEADER
/* <Return> */
/* Font format string. NULL in case of error. */
/* */
+ /* <Note> */
+ /* A deprecated name for the same function is */
+ /* `FT_Get_X11_Font_Format'. */
+ /* */
+ FT_EXPORT( const char* )
+ FT_Get_Font_Format( FT_Face face );
+
+
+ /* deprecated */
FT_EXPORT( const char* )
FT_Get_X11_Font_Format( FT_Face face );
+
/* */
diff --git a/modules.cfg b/modules.cfg
index 32f78c1..9ba66df 100644
--- a/modules.cfg
+++ b/modules.cfg
@@ -168,7 +168,7 @@ BASE_EXTENSIONS += ftbitmap.c
# See include/ftcid.h for the API.
BASE_EXTENSIONS += ftcid.c
-# Support functions for X11.
+# Support functions for font formats.
#
# See include/ftfntfmt.h for the API.
BASE_EXTENSIONS += ftfntfmt.c
diff --git a/src/base/ftfntfmt.c b/src/base/ftfntfmt.c
index b9e9395..38a5b60 100644
--- a/src/base/ftfntfmt.c
+++ b/src/base/ftfntfmt.c
@@ -2,7 +2,7 @@
/* */
/* ftfntfmt.c */
/* */
-/* FreeType utility file for X11 support (body). */
+/* FreeType utility file for font formats (body). */
/* */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -25,6 +25,21 @@
/* documentation is in ftfntfmt.h */
FT_EXPORT_DEF( const char* )
+ FT_Get_Font_Format( FT_Face face )
+ {
+ const char* result = NULL;
+
+
+ if ( face )
+ FT_FACE_FIND_SERVICE( face, result, XF86_NAME );
+
+ return result;
+ }
+
+
+ /* deprecated function name; retained for ABI compatibility */
+
+ FT_EXPORT_DEF( const char* )
FT_Get_X11_Font_Format( FT_Face face )
{
const char* result = NULL;