Behdad Esfahbod
Behdad Esfahbod
> > Also see https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/ttLib/tables/_c_m_a_p.py#L783 > > I believe it's this. The number of segments is 772 in fontc-generated font, and 103 in fonttools. And length of `glyphIndexArray` is 0...
> So, the fontc code is not using the `glyphIndexArray` mechanism at all. https://github.com/googlefonts/fontations/blob/main/write-fonts/src/tables/cmap.rs#L56
> Also see https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/ttLib/tables/_c_m_a_p.py#L783 And more importantly: https://github.com/fonttools/fonttools/blob/0a3360e52727cdefce2e9b28286b074faf99033c/Lib/fontTools/ttLib/tables/_c_m_a_p.py#L994-L1010
FWIW in HarfBuzz we just accept it and that's about it.
For example, here's the output of `$ ninja -Cbuild && perf record build/perf/benchmark-font --benchmark_filter=draw_glyph`: ``` -------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------------------------------------- BM_Font/draw_glyph/Roboto-Regular.ttf/hb 534 us 533 us 1326 BM_Font/draw_glyph/Roboto-Regular.ttf/ft 706 us...
I don't have time to study the full thread and reply, but whatever Khaled has to say is correct.
`c++0x` should be replaced with `c++11` perhaps?
Or just reimplement hypot. Humm.. hypot is in math.h as well.
Also see this: https://github.com/harfbuzz/harfbuzz/pull/3297
To be fair, the suggestion looks cool! Thanks for using the tool. Can you email me the font? behdad at behdad dot org. Thanks