[sfnt] s/TT_NameEntry/TT_Name/. * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed to... (TT_NameRec): This. (TT_NameTableRec): Updated. * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Renamed to... (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, respectively. (TT_NameEntry_ConvertFunc): Renamed to... (TT_Name_ConvertFunc): This. (tt_face_get_name): Updated. * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_names): 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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
diff --git a/ChangeLog b/ChangeLog
index 22a4484..bd45d75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2017-01-25 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] s/TT_NameEntry/TT_Name/.
+
+ * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed
+ to...
+ (TT_NameRec): This.
+ (TT_NameTableRec): Updated.
+
+ * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated.
+
+ * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
+ tt_name_entry_ascii_from_other): Renamed to...
+ (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This,
+ respectively.
+ (TT_NameEntry_ConvertFunc): Renamed to...
+ (TT_Name_ConvertFunc): This.
+ (tt_face_get_name): Updated.
+
+ * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_names):
+ Updated.
+
2017-01-24 Werner Lemberg <wl@gnu.org>
[sfnt] Fix Postscript name service for symbol fonts.
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 79c2be2..d6cf934 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -243,7 +243,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* TT_NameEntryRec */
+ /* TT_NameRec */
/* */
/* <Description> */
/* A structure modeling TrueType name records. Name records are used */
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
/* string :: A pointer to the string's bytes. Note that these */
/* are usually UTF-16 encoded characters. */
/* */
- typedef struct TT_NameEntryRec_
+ typedef struct TT_NameRec_
{
FT_UShort platformID;
FT_UShort encodingID;
@@ -281,7 +281,7 @@ FT_BEGIN_HEADER
FT_Byte* string;
- } TT_NameEntryRec, *TT_NameEntry;
+ } TT_NameRec, *TT_Name;
/*************************************************************************/
@@ -306,11 +306,11 @@ FT_BEGIN_HEADER
/* */
typedef struct TT_NameTableRec_
{
- FT_UShort format;
- FT_UInt numNameRecords;
- FT_UInt storageOffset;
- TT_NameEntryRec* names;
- FT_Stream stream;
+ FT_UShort format;
+ FT_UInt numNameRecords;
+ FT_UInt storageOffset;
+ TT_NameRec* names;
+ FT_Stream stream;
} TT_NameTableRec, *TT_NameTable;
diff --git a/src/base/ftsnames.c b/src/base/ftsnames.c
index a5b41eb..76ab7b2 100644
--- a/src/base/ftsnames.c
+++ b/src/base/ftsnames.c
@@ -54,7 +54,7 @@
if ( idx < (FT_UInt)ttface->num_names )
{
- TT_NameEntryRec* entry = ttface->name_table.names + idx;
+ TT_Name entry = ttface->name_table.names + idx;
/* load name on demand */
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 8877ad3..a70f9a2 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -238,7 +238,7 @@
for ( n = 0; n < face->num_names; n++ )
{
- TT_NameEntryRec* name = face->name_table.names + n;
+ TT_Name name = face->name_table.names + n;
if ( name->nameID == 6 && name->stringLength > 0 )
@@ -258,10 +258,10 @@
if ( found_win != -1 )
{
- FT_Memory memory = face->root.memory;
- TT_NameEntryRec* name = face->name_table.names + found_win;
- FT_UInt len = name->stringLength / 2;
- FT_Error error = FT_Err_Ok;
+ FT_Memory memory = face->root.memory;
+ TT_Name name = face->name_table.names + found_win;
+ FT_UInt len = name->stringLength / 2;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( error );
@@ -300,10 +300,10 @@
if ( found_apple != -1 )
{
- FT_Memory memory = face->root.memory;
- TT_NameEntryRec* name = face->name_table.names + found_apple;
- FT_UInt len = name->stringLength;
- FT_Error error = FT_Err_Ok;
+ FT_Memory memory = face->root.memory;
+ TT_Name name = face->name_table.names + found_apple;
+ FT_UInt len = name->stringLength;
+ FT_Error error = FT_Err_Ok;
FT_UNUSED( error );
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index ff0299a..1ee7a4d 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -54,8 +54,8 @@
/* convert a UTF-16 name entry to ASCII */
static FT_String*
- tt_name_entry_ascii_from_utf16( TT_NameEntry entry,
- FT_Memory memory )
+ tt_name_ascii_from_utf16( TT_Name entry,
+ FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
@@ -89,8 +89,8 @@
/* convert an Apple Roman or symbol name entry to ASCII */
static FT_String*
- tt_name_entry_ascii_from_other( TT_NameEntry entry,
- FT_Memory memory )
+ tt_name_ascii_from_other( TT_Name entry,
+ FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
@@ -122,8 +122,8 @@
}
- typedef FT_String* (*TT_NameEntry_ConvertFunc)( TT_NameEntry entry,
- FT_Memory memory );
+ typedef FT_String* (*TT_Name_ConvertFunc)( TT_Name entry,
+ FT_Memory memory );
/* documentation is in sfnt.h */
@@ -133,20 +133,21 @@
FT_UShort nameid,
FT_String** name )
{
- FT_Memory memory = face->root.memory;
- FT_Error error = FT_Err_Ok;
- FT_String* result = NULL;
- FT_UShort n;
- TT_NameEntryRec* rec;
- FT_Int found_apple = -1;
- FT_Int found_apple_roman = -1;
- FT_Int found_apple_english = -1;
- FT_Int found_win = -1;
- FT_Int found_unicode = -1;
+ FT_Memory memory = face->root.memory;
+ FT_Error error = FT_Err_Ok;
+ FT_String* result = NULL;
+ FT_UShort n;
+ TT_Name rec;
- FT_Bool is_english = 0;
+ FT_Int found_apple = -1;
+ FT_Int found_apple_roman = -1;
+ FT_Int found_apple_english = -1;
+ FT_Int found_win = -1;
+ FT_Int found_unicode = -1;
- TT_NameEntry_ConvertFunc convert;
+ FT_Bool is_english = 0;
+
+ TT_Name_ConvertFunc convert;
FT_ASSERT( name );
@@ -231,7 +232,7 @@
/* all Unicode strings are encoded using UTF-16BE */
case TT_MS_ID_UNICODE_CS:
case TT_MS_ID_SYMBOL_CS:
- convert = tt_name_entry_ascii_from_utf16;
+ convert = tt_name_ascii_from_utf16;
break;
case TT_MS_ID_UCS_4:
@@ -240,7 +241,7 @@
/* MsGothic font shipped with Windows Vista shows that this really */
/* means UTF-16 encoded names (UCS-4 values are only used within */
/* charmaps). */
- convert = tt_name_entry_ascii_from_utf16;
+ convert = tt_name_ascii_from_utf16;
break;
default:
@@ -250,12 +251,12 @@
else if ( found_apple >= 0 )
{
rec = face->name_table.names + found_apple;
- convert = tt_name_entry_ascii_from_other;
+ convert = tt_name_ascii_from_other;
}
else if ( found_unicode >= 0 )
{
rec = face->name_table.names + found_unicode;
- convert = tt_name_entry_ascii_from_utf16;
+ convert = tt_name_ascii_from_utf16;
}
if ( rec && convert )
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 53837c7..3ab211c 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -826,7 +826,7 @@
static const FT_Frame_Field name_record_fields[] =
{
#undef FT_STRUCTURE
-#define FT_STRUCTURE TT_NameEntryRec
+#define FT_STRUCTURE TT_NameRec
/* no FT_FRAME_START */
FT_FRAME_USHORT( platformID ),
@@ -880,7 +880,7 @@
/* Load the name records and determine how much storage is needed */
/* to hold the strings themselves. */
{
- TT_NameEntryRec* entry = table->names;
+ TT_Name entry = table->names;
for ( ; count > 0; count-- )
@@ -935,7 +935,7 @@
{
FT_Memory memory = face->root.driver->root.memory;
TT_NameTable table = &face->name_table;
- TT_NameEntry entry = table->names;
+ TT_Name entry = table->names;
FT_UInt count = table->numNameRecords;