* src/sfnt/ttkern.h (TT_FACE_HAS_KERNING): Remove macro.

Given that we also support (limited) 'GPOS' table kerning if
`TT_CONFIG_OPTION_GPOS_KERNING` is defined, the name of this macro is
misleading since it only is true for 'kern' table kerning.

* src/sfnt/sfobjs.c (sfn_load_face): Replace `TT_FACE_HAS_KERNING` with
  plain code.
This commit is contained in:
Werner Lemberg
2025-07-04 06:03:37 +02:00
parent 0fd0cf33fd
commit fb6a74269d
3 changed files with 2 additions and 4 deletions

View File

@@ -1127,7 +1127,7 @@
flags |= FT_FACE_FLAG_VERTICAL;
/* kerning available ? */
if ( TT_FACE_HAS_KERNING( face )
if ( face->kern_avail_bits
#ifdef TT_CONFIG_OPTION_GPOS_KERNING
|| face->gpos_kerning_available
#endif

View File

@@ -40,8 +40,6 @@ FT_BEGIN_HEADER
FT_UInt left_glyph,
FT_UInt right_glyph );
#define TT_FACE_HAS_KERNING( face ) ( (face)->kern_avail_bits != 0 )
FT_END_HEADER

View File

@@ -220,7 +220,7 @@
{
/* Use 'kern' table if available since that can be faster; otherwise */
/* use GPOS kerning pairs if available. */
if ( ttface->kern_avail_bits != 0 )
if ( ttface->kern_avail_bits )
kerning->x = sfnt->get_kerning( ttface,
left_glyph,
right_glyph );