mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 08:48:02 +02: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:
parent
fb6a74269d
commit
ecbc1abfa8
1 changed files with 14 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue