Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
5182264a
by Werner Lemberg at 2022-10-10T12:41:49+02:00
[cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`.
This ancient option stayed completely undocumented. Given that the 'cff'
driver requires the 'psnames' module, it makes no sense today to have this
macro.
* src/cff/cffdrivr.c (cff_services), src/cff/cffobjs.c (cff_face_init):
Remove corresponding conditional code.
4 changed files:
Changes:
docs/CHANGES
... |
... |
@@ -11,7 +11,13 @@ CHANGES BETWEEN 2.12.1 and 2.12.2 |
11
|
11
|
provides an excelent alternative. This is the last FreeType version
|
12
|
12
|
with TT_INTERPRETER_VERSION_38 and TT_INTERPRETER_VERSION_40 treated
|
13
|
13
|
differently.
|
|
14
|
+
|
|
15
|
+ I. MISCELLANEOUS
|
|
16
|
+
|
|
17
|
+ - The only referenced but never documented configuration macro
|
|
18
|
+ `FT_CONFIG_OPTION_NO_GLYPH_NAMES` has been removed.
|
14
|
19
|
|
|
20
|
+
|
15
|
21
|
======================================================================
|
16
|
22
|
|
17
|
23
|
CHANGES BETWEEN 2.12.0 and 2.12.1
|
include/freetype/freetype.h
... |
... |
@@ -4174,12 +4174,14 @@ FT_BEGIN_HEADER |
4174
|
4174
|
* The glyph index. 0~means 'undefined character code'.
|
4175
|
4175
|
*
|
4176
|
4176
|
* @note:
|
4177
|
|
- * The acceptable glyph name might come from
|
4178
|
|
- * [Adobe Glyph List](https://github.com/adobe-type-tools/agl-aglfn).
|
4179
|
|
- * See @FT_Get_Glyph_Name for the resiprocal function.
|
4180
|
|
- *
|
4181
|
|
- * This function always returns~0 if the config macro
|
4182
|
|
- * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
|
|
4177
|
+ * Acceptable glyph names might come from the [Adobe Glyph
|
|
4178
|
+ * List](https://github.com/adobe-type-tools/agl-aglfn). See
|
|
4179
|
+ * @FT_Get_Glyph_Name for the inverse functionality.
|
|
4180
|
+ *
|
|
4181
|
+ * This function has limited capabilities if the config macro
|
|
4182
|
+ * `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` is not defined in `ftoption.h`:
|
|
4183
|
+ * It then works only for fonts that actually embed glyph names (which
|
|
4184
|
+ * many recent OpenType fonts do not).
|
4183
|
4185
|
*/
|
4184
|
4186
|
FT_EXPORT( FT_UInt )
|
4185
|
4187
|
FT_Get_Name_Index( FT_Face face,
|
... |
... |
@@ -4223,8 +4225,10 @@ FT_BEGIN_HEADER |
4223
|
4225
|
* Be aware that FreeType reorders glyph indices internally so that glyph
|
4224
|
4226
|
* index~0 always corresponds to the 'missing glyph' (called '.notdef').
|
4225
|
4227
|
*
|
4226
|
|
- * This function always returns an error if the config macro
|
4227
|
|
- * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
|
|
4228
|
+ * This function has limited capabilities if the config macro
|
|
4229
|
+ * `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` is not defined in `ftoption.h`:
|
|
4230
|
+ * It then works only for fonts that actually embed glyph names (which
|
|
4231
|
+ * many recent OpenType fonts do not).
|
4228
|
4232
|
*/
|
4229
|
4233
|
FT_EXPORT( FT_Error )
|
4230
|
4234
|
FT_Get_Glyph_Name( FT_Face face,
|
src/cff/cffdrivr.c
... |
... |
@@ -1108,8 +1108,7 @@ |
1108
|
1108
|
/*************************************************************************/
|
1109
|
1109
|
/*************************************************************************/
|
1110
|
1110
|
|
1111
|
|
-#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
|
1112
|
|
- defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
|
1111
|
+#if defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
1113
|
1112
|
FT_DEFINE_SERVICEDESCREC10(
|
1114
|
1113
|
cff_services,
|
1115
|
1114
|
|
... |
... |
@@ -1124,7 +1123,7 @@ |
1124
|
1123
|
FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
|
1125
|
1124
|
FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
|
1126
|
1125
|
)
|
1127
|
|
-#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
|
|
1126
|
+#else
|
1128
|
1127
|
FT_DEFINE_SERVICEDESCREC8(
|
1129
|
1128
|
cff_services,
|
1130
|
1129
|
|
... |
... |
@@ -1137,32 +1136,6 @@ |
1137
|
1136
|
FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
|
1138
|
1137
|
FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
|
1139
|
1138
|
)
|
1140
|
|
-#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
1141
|
|
- FT_DEFINE_SERVICEDESCREC9(
|
1142
|
|
- cff_services,
|
1143
|
|
-
|
1144
|
|
- FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
|
1145
|
|
- FT_SERVICE_ID_MULTI_MASTERS, &cff_service_multi_masters,
|
1146
|
|
- FT_SERVICE_ID_METRICS_VARIATIONS, &cff_service_metrics_var,
|
1147
|
|
- FT_SERVICE_ID_POSTSCRIPT_INFO, &cff_service_ps_info,
|
1148
|
|
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cff_service_ps_name,
|
1149
|
|
- FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info,
|
1150
|
|
- FT_SERVICE_ID_CID, &cff_service_cid_info,
|
1151
|
|
- FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
|
1152
|
|
- FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
|
1153
|
|
- )
|
1154
|
|
-#else
|
1155
|
|
- FT_DEFINE_SERVICEDESCREC7(
|
1156
|
|
- cff_services,
|
1157
|
|
-
|
1158
|
|
- FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
|
1159
|
|
- FT_SERVICE_ID_POSTSCRIPT_INFO, &cff_service_ps_info,
|
1160
|
|
- FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cff_service_ps_name,
|
1161
|
|
- FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info,
|
1162
|
|
- FT_SERVICE_ID_CID, &cff_service_cid_info,
|
1163
|
|
- FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
|
1164
|
|
- FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
|
1165
|
|
- )
|
1166
|
1139
|
#endif
|
1167
|
1140
|
|
1168
|
1141
|
|
src/cff/cffobjs.c
... |
... |
@@ -1031,12 +1031,10 @@ |
1031
|
1031
|
cffface->style_flags = flags;
|
1032
|
1032
|
}
|
1033
|
1033
|
|
1034
|
|
-#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
|
1035
|
1034
|
/* CID-keyed CFF or CFF2 fonts don't have glyph names -- the SFNT */
|
1036
|
1035
|
/* loader has unset this flag because of the 3.0 `post' table. */
|
1037
|
1036
|
if ( dict->cid_registry == 0xFFFFU && !cff2 )
|
1038
|
1037
|
cffface->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
|
1039
|
|
-#endif
|
1040
|
1038
|
|
1041
|
1039
|
if ( dict->cid_registry != 0xFFFFU && pure_cff )
|
1042
|
1040
|
cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
|
|