freetype2/include/freetype
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
..
config Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
internal Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
freetype.h Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
ftadvanc.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftbbox.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftbdf.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftbitmap.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftbzip2.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftcache.h * include/freetype/ftcache.h: Typo, punctuation. 2023-05-12 05:59:00 +02:00
ftchapters.h API documentation: Re-organize chapters and sections 2023-04-30 14:42:11 +00:00
ftcid.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftcolor.h The 'COLR' v1 API will no longer be experimental in the next release. 2023-01-19 07:17:14 +01:00
ftdriver.h s/this is,/that is,/ 2023-04-27 06:24:48 +02:00
fterrdef.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fterrors.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftfntfmt.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftgasp.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftglyph.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftgxval.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftgzip.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftimage.h * include/freetype/ftimage.h: Fix type and link. 2023-11-13 23:15:00 -05:00
ftincrem.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftlcdfil.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftlist.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftlogging.h Add missing end quote of a string in the example code of FT_Trace_Set_Level 2023-05-19 14:11:57 -04:00
ftlzw.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftmac.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftmm.h [truetype] Fix deactivation of variation font handling. 2023-05-06 18:53:50 +02:00
ftmodapi.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftmoderr.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftotval.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftoutln.h fix typo in FT_Outline_Decompose note 2023-10-08 23:34:28 +00:00
ftparams.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftpfr.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftrender.h Mark FT_Renderer_Class::raster_class as pointer to const 2023-06-05 12:06:24 -04:00
ftsizes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftsnames.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftstroke.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftsynth.h * src/base/ftsynth.c (FT_GlyphSlot_AdjustWeight): New API. 2023-03-16 03:28:59 +00:00
ftsystem.h * include/freetype/ftsystem.h (FT_Stream_IoFunc): Improve documentation. 2023-03-16 05:26:48 +01:00
fttrigon.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fttypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftwinfnt.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
otsvg.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
t1tables.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttnameid.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
tttables.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
tttags.h Update all copyright notices. 2023-01-17 09:18:25 +01:00