mirror of
git://git.sv.nongnu.org/freetype/freetype2.git
synced 2026-01-19 04:52:09 +00:00
[cff] Support GPOS kerning.
* src/cff/cffdrivr.c (cff_get_kerning) [TT_CONFIG_OPTION_GPOS_KERNING]: Add code similar to the one in `tt_get_kerning`.
This commit is contained in:
@@ -121,7 +121,20 @@
|
||||
kerning->y = 0;
|
||||
|
||||
if ( sfnt )
|
||||
kerning->x = sfnt->get_kerning( cffface, left_glyph, right_glyph );
|
||||
{
|
||||
/* Use 'kern' table if available since that can be faster; otherwise */
|
||||
/* use GPOS kerning pairs if available. */
|
||||
if ( cffface->kern_avail_bits )
|
||||
kerning->x = sfnt->get_kerning( cffface,
|
||||
left_glyph,
|
||||
right_glyph );
|
||||
#ifdef TT_CONFIG_OPTION_GPOS_KERNING
|
||||
else if ( cffface->gpos_kerning_available )
|
||||
kerning->x = sfnt->get_gpos_kerning( cffface,
|
||||
left_glyph,
|
||||
right_glyph );
|
||||
#endif
|
||||
}
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user