freetype/src
Werner Lemberg b04db3872c [sfnt] Rewrite GPOS kerning support. (2/2)
The previous code had a fundamental flaw: it didn't validate the necessary
parts of the 'GPOS' table before accessing it, causing crashes with
malformed data (since `TT_CONFIG_OPTION_GPOS_KERNING` is off by default,
standard fuzzers don't catch these problems).  Additionally, it did a lot of
parsing while accessing kerning data, making it rather slow.

The new implementation fixes this.  After validation, offsets to the 'GPOS'
lookup subtables used in the 'kern' feature that correspond to 'simple'
kerning (i.e., similar to 'kern' table kerning) are stored in `TT_Face`;
this greatly simplifies and accelerates access to the kerning data.

Testing with font `SF-Pro.ttf` version '1.00', the validation time for the
'GPOS' table increases the start-up time of `FT_New_Face` by less than 1%,
while calls to `FT_Get_Kerning` become about 3.5 times faster.

* include/freetype/internal (gpos_kerning_available): Replace with...
  (gpos_lookups_kerning, num_gpos_lookups_kerning): ... these new fields.
  Update callers.

* src/ttgpos.c [TT_CONFIG_OPTION_GPOS_KERNING]: A new implementation.
2025-07-05 14:51:40 +02:00
..
autofit [autofit] Remove globals->gsub_length. 2025-07-05 14:51:07 +02:00
base Various minor fixes. 2025-07-01 18:06:17 +02:00
bdf More signedness fixes. 2025-07-01 18:00:12 +02:00
bzip2 Update all copyright notices. 2024-01-27 11:11:22 -05:00
cache * src/*/*: Fix C++ compilation; fix clang warnings. 2024-08-12 12:34:28 +02:00
cff [sfnt] Rewrite GPOS kerning support. (2/2) 2025-07-05 14:51:40 +02:00
cid */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
dlg Update all copyright notices. 2024-01-27 11:11:22 -05:00
gxvalid */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
gzip [gzip] Update sources to zlib 1.13.1. 2025-05-28 07:31:57 +02:00
lzw Update all copyright notices. 2024-01-27 11:11:22 -05:00
otvalid */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
pcf */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
pfr */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
psaux Various minor fixes. 2025-07-01 18:06:17 +02:00
pshinter */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
psnames Update all copyright notices. 2024-01-27 11:11:22 -05:00
raster Whitespace, formatting, minor spelling fix. 2025-05-14 10:20:04 +02:00
sdf */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
sfnt [sfnt] Rewrite GPOS kerning support. (2/2) 2025-07-05 14:51:40 +02:00
smooth Missing header wrappers. 2025-04-04 19:54:50 -04:00
svg Update all copyright notices. 2024-01-27 11:11:22 -05:00
tools apinames: Fix a buffer overrun for VMS platform. 2024-10-13 21:18:47 +09:00
truetype [sfnt] Rewrite GPOS kerning support. (2/2) 2025-07-05 14:51:40 +02:00
type1 */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
type42 */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00
winfonts */*: Fix trivial signedness issues with format strings in trace messages. 2025-07-01 17:08:37 +02:00