[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.
This commit is contained in:
Werner Lemberg 2022-10-10 12:31:53 +02:00
parent 0d66abca4b
commit 5182264a40
4 changed files with 19 additions and 38 deletions

View File

@ -11,7 +11,13 @@ CHANGES BETWEEN 2.12.1 and 2.12.2
provides an excelent alternative. This is the last FreeType version
with TT_INTERPRETER_VERSION_38 and TT_INTERPRETER_VERSION_40 treated
differently.
I. MISCELLANEOUS
- The only referenced but never documented configuration macro
`FT_CONFIG_OPTION_NO_GLYPH_NAMES` has been removed.
======================================================================
CHANGES BETWEEN 2.12.0 and 2.12.1

View File

@ -4174,12 +4174,14 @@ FT_BEGIN_HEADER
* The glyph index. 0~means 'undefined character code'.
*
* @note:
* The acceptable glyph name might come from
* [Adobe Glyph List](https://github.com/adobe-type-tools/agl-aglfn).
* See @FT_Get_Glyph_Name for the resiprocal function.
* Acceptable glyph names might come from the [Adobe Glyph
* List](https://github.com/adobe-type-tools/agl-aglfn). See
* @FT_Get_Glyph_Name for the inverse functionality.
*
* This function always returns~0 if the config macro
* `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
* This function has limited capabilities if the config macro
* `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` is not defined in `ftoption.h`:
* It then works only for fonts that actually embed glyph names (which
* many recent OpenType fonts do not).
*/
FT_EXPORT( FT_UInt )
FT_Get_Name_Index( FT_Face face,
@ -4223,8 +4225,10 @@ FT_BEGIN_HEADER
* Be aware that FreeType reorders glyph indices internally so that glyph
* index~0 always corresponds to the 'missing glyph' (called '.notdef').
*
* This function always returns an error if the config macro
* `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
* This function has limited capabilities if the config macro
* `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` is not defined in `ftoption.h`:
* It then works only for fonts that actually embed glyph names (which
* many recent OpenType fonts do not).
*/
FT_EXPORT( FT_Error )
FT_Get_Glyph_Name( FT_Face face,

View File

@ -1108,8 +1108,7 @@
/*************************************************************************/
/*************************************************************************/
#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
#if defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_DEFINE_SERVICEDESCREC10(
cff_services,
@ -1124,7 +1123,7 @@
FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
)
#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
#else
FT_DEFINE_SERVICEDESCREC8(
cff_services,
@ -1137,32 +1136,6 @@
FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
)
#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_DEFINE_SERVICEDESCREC9(
cff_services,
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
FT_SERVICE_ID_MULTI_MASTERS, &cff_service_multi_masters,
FT_SERVICE_ID_METRICS_VARIATIONS, &cff_service_metrics_var,
FT_SERVICE_ID_POSTSCRIPT_INFO, &cff_service_ps_info,
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cff_service_ps_name,
FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info,
FT_SERVICE_ID_CID, &cff_service_cid_info,
FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
)
#else
FT_DEFINE_SERVICEDESCREC7(
cff_services,
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF,
FT_SERVICE_ID_POSTSCRIPT_INFO, &cff_service_ps_info,
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cff_service_ps_name,
FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info,
FT_SERVICE_ID_CID, &cff_service_cid_info,
FT_SERVICE_ID_PROPERTIES, &cff_service_properties,
FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
)
#endif

View File

@ -1031,12 +1031,10 @@
cffface->style_flags = flags;
}
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
/* CID-keyed CFF or CFF2 fonts don't have glyph names -- the SFNT */
/* loader has unset this flag because of the 3.0 `post' table. */
if ( dict->cid_registry == 0xFFFFU && !cff2 )
cffface->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
#endif
if ( dict->cid_registry != 0xFFFFU && pure_cff )
cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;