Open rsheeter opened 7 months ago
Random thought (I've told @anthrotype on the side I think): you may benefit from translating to Rust the GPOS compaction from here: https://github.com/fonttools/fonttools/pull/2326. It's not super slow even though it's Python, so it might be fast enough in Rust, and it doesn't need to know about the glyph's Unicode properties (so no need for GSUB closure) in order to decide how to split the subtables, it does so only by looking at the filled-in/empty areas of the matrices. Let me know if you have any questions.
thanks Jany, that's worth looking into. I think it probably deserves its own issue https://github.com/googlefonts/fontc/issues/612
Kerning is the majority of the critical path when I build GS locally. Hopefully we can speed it up and/or parallelize it!
why is kerning there twice?
The first is FE the second is BE. Apparently I didn't see the need to distinguish them very much :D
If I print the time for
bytes_for
infontbe/src/font.rs
GPOS takes ~10x GSUB which takes ~50x the next table in line:GPOS is about 16% of the total build time (real). We know we generate over-large GPOS tables (https://github.com/googlefonts/fontc/issues/593), that probably doesn't help.
https://github.com/googlefonts/fontc/pull/611 is my exploration that led to discovering this; I had assumed if I did everything except layout ahead it would help but it made no real difference which led me to the surprising bytes_for breakdown.