freetype2/src/sfnt
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
..
module.mk Update all copyright notices. 2023-01-17 09:18:25 +01:00
pngshim.c * src/sfnt/pngshim.c (Load_SBit_Png): Remove FALL_THROUGH warning. 2023-04-28 19:40:35 -04:00
pngshim.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
rules.mk Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfdriver.c Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
sfdriver.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sferrors.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfnt.c Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
sfobjs.c Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
sfobjs.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfwoff.c * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
sfwoff.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfwoff2.c [woff2] Clean up on large brotli expansion 2023-07-18 13:34:09 -04:00
sfwoff2.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttbdf.c * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface. 2023-05-07 14:59:50 +02:00
ttbdf.h * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface. 2023-05-07 14:59:50 +02:00
ttcmap.c * src/sfnt/ttcmap: Signature fixes. 2023-05-07 19:16:38 +02:00
ttcmap.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttcmapc.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttcolr.c * src/sfnt/ttcolr.c (find_base_glyph_v1_record): Fix build in C90 mode. 2024-01-08 20:27:03 +01:00
ttcolr.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttcpal.c * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
ttcpal.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttgpos.c Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
ttgpos.h Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
ttkern.c Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttkern.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttload.c * src/sfnt/ttload.c (tt_face_load_font_dir): Add another guard. 2023-04-28 15:33:58 +02:00
ttload.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttmtx.c [sfnt, truetype] Add `size_reset` to `MetricsVariations`. 2023-04-11 10:20:58 +02:00
ttmtx.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttpost.c [sfnt] Restrict POST version 1.0. 2024-01-04 21:38:51 -05:00
ttpost.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttsbit.c * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
ttsbit.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttsvg.c * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
ttsvg.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
woff2tags.c * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
woff2tags.h Update all copyright notices. 2023-01-17 09:18:25 +01:00