freetype2/src
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
..
autofit [autofit] Fix synchronization mistake between FreeType and ttfautohint. 2023-09-05 08:09:31 +02:00
base [base] Fix up Mac resource forks and dfonts. 2024-01-06 19:22:36 -05:00
bdf Replace `sprintf` with `snprintf`. 2023-05-23 13:18:01 +02:00
bzip2 * src/bzip2/ftbzip2.c: Signature fixes. 2023-05-08 06:26:43 +02:00
cache [cache] Merge functions. 2023-05-12 22:27:08 -04:00
cff [CFF] Extract `BlueValues` as `Fixed` rather than `Int`. 2023-12-14 07:17:01 +01:00
cid [type1, cid, type42] Post-cleanup. 2023-09-09 22:20:00 -04:00
dlg * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
gxvalid * src/gxvalid/gxvcommn.h (GXV_USHORT_TO_SHORT): Removed. 2023-09-25 22:26:15 -04:00
gzip [gzip] Update sources to zlib 1.13. 2023-08-27 09:47:24 +02:00
lzw Fix 'fall-through' warning messages. 2023-02-08 21:09:32 +01:00
otvalid Update all copyright notices. 2023-01-17 09:18:25 +01:00
pcf * src/pcf/pcfutil.c (BSWAP16): Limit clang support. 2023-10-21 19:08:20 -04:00
pfr [pfr] Signature fixes. 2023-05-07 15:57:06 +02:00
psaux [CFF] Extract `BlueValues` as `Fixed` rather than `Int`. 2023-12-14 07:17:01 +01:00
pshinter [pshinter] Signature fixes. 2023-05-07 20:26:12 +02:00
psnames */*: Remove many function pointer casts. 2023-06-03 06:58:09 +02:00
raster * src/raster/ftraster.c (Draw_Sweep): Swap stub conditions. 2023-12-01 23:13:28 -05:00
sdf [sdf] Correct handling of empty glyphs. 2023-06-09 05:38:49 +02:00
sfnt Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
smooth [smooth] Remove SSE2. 2024-01-14 13:03:51 +00:00
svg */*: Remove many function pointer casts. 2023-06-03 06:58:09 +02:00
tools * src/tools/apinames.c (read_header_file): Typos. 2023-09-14 13:00:07 +00:00
truetype Add support for kerning from 'GPOS' tables. 2024-01-27 10:55:04 +01:00
type1 * src/type1/t1afm.c (t1_get_index): Restore `strlen` call. 2023-09-10 22:34:17 -04:00
type42 [type1, cid, type42] Post-cleanup. 2023-09-09 22:20:00 -04:00
winfonts * src/winfonts/winfnt.c: Signature fixes. 2023-05-07 16:30:21 +02:00