Commit 3dd7fc42bc76b3c826d0118747b89486b83081f8

Werner Lemberg 2025-05-19T05:37:23

[autofit] Speed up construction of reverse character map. (2/4) This commit, together with the previous one, makes the startup of the auto-hinter much faster. Note, though, that the startup time for handling the diacritic database is still rather large. For example, loading `arial.ttf` version 7.00 followed by auto-hinting a first Latin glyph is still approx. three times slower than before the introduction of the database (this is because function `hb_ot_layout_lookup_get_glyph_alternates` is called very often). * src/autofit/afshaper.c (scripts): Rename this array to... (af_hb_scripts): ...this and export it. (af_shaper_get_coverage_hb): Updated. * src/autofit/afshaper.h: Updated. * src/autofit/afadjust.c (af_reverse_character_map_new): Pass the current script to `hb_ot_layout_collect_lookups` to make HarfBuzz check less lookups while searching for glyph alternates.