freetype2/include/freetype/internal
David Saltzman 8f286c86ef Add support for kerning from 'GPOS' tables.
This commit adds support for kerning from 'GPOS' tables, while maintaining
support for basic 'kern' tables.  `FT_HAS_KERNING` will be true for a font
with either available and `FT_Get_Kerning` will still use the basic 'kern'
table data if avilable, otherwise check the GPOS 'kern' feature.

This feature is disabled by default; it can be enabled with the
`TT_CONFIG_OPTION_GPOS_KERNING` flag.

Only basic kerning (pair positioning with just an x advance) is supported
from the GPOS layout features; support for that was added to make the
existing `FT_Get_Kerning` API more consistently functional.  FreeType does
not intend to extend itself to further GPOS functionality though; a
higher-level library like HarfBuzz can be used instead for that.

* include/freetype/config/ftoption.h, include/devel/ftoption.h
(TT_CONFIG_OPTION_GPOS_KERNING): New configuration option.

* include/freetype/internal/fttrace.h: Add `ttgpos` trace handler.

* include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_gpos` and
`get_gpos_kerning` fields.
(FT_DEFINE_SFNT_INTERFACE): Updated.

* include/freetype/internal/tttypes.h: Include `fttypes.h`.
(TT_FaceRec) [TT_CONFIG_OPTION_GPOS_KERNING]: Add `gpos_table` and
`gpos_kerning_available` fields.

* src/sfnt/ttgpos.c, src/sfnt/ttgpos.h: New files.

* src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`.
(sfnt_interface): Updated.

* src/sfnt/sfnt.c: Include `ttgpos.c`.

* src/sfnt/sfobjs.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`.
(sfnt_load_face) [TT_CONFIG_OPTION_GPOS_KERNING]: Load and free GPOS kerning
data; check GPOS kerning availability.

* src/truetype/ttdriver.c (tt_get_kerning): Use GPOS kerning if there's no
'kern' table.
2024-01-27 10:55:04 +01:00
..
services Fix some `FT_Fixed` vs. `FT_Long` confusion. 2023-06-03 07:02:12 +02:00
autohint.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
cffotypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
cfftypes.h [CFF] Extract `BlueValues` as `Fixed` rather than `Int`. 2023-12-14 07:17:01 +01:00
compiler-macros.h * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. 2023-03-01 06:36:59 +01:00
ftcalc.h * include/freetype/internal/ftcalc.h (FT_MSB): Define for Solaris 11. 2023-09-21 02:28:32 +00:00
ftdebug.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftdrv.h [cid] Improve tracing messages; formatting. 2023-05-06 16:41:13 +02:00
ftgloadr.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fthash.h Remove redundant inclusion of `ft2build.h'. 2020-06-13 21:15:45 +02:00
ftmemory.h Avoid reserved identifiers that are globally defined. 2023-02-08 21:09:30 +01:00
ftmmtypes.h [truetype] Reduce heap allocation of `deltaSet` variation data. 2023-05-19 06:50:28 +02:00
ftobjs.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftpsprop.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftrfork.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftserv.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftstream.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fttrace.h Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
ftvalid.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
psaux.h [type1, cid, type42] Post-cleanup. 2023-09-09 22:20:00 -04:00
pshints.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfnt.h Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
svginterface.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
t1types.h * include/freetype/internal/t1types.h: Fix the indentation. 2023-05-12 09:49:58 +09:00
tttypes.h Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
wofftypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00