[Fontconfig-bugs] [Bug 64766] Make fontconfig scanning faster

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 18 23:44:57 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=64766

--- Comment #47 from Behdad Esfahbod <freedesktop at behdad.org> ---
Motivated by bug 101820, I like to revive this work.

There are two options:

  - Do not bother detecting glyphs with no outline.  This will cause some
broken fonts to result in inferior rendering.  I'm not sure how bad that is in
practice.

  - Try to detect glyphs with no outline, but implement it ourselves instead of
loading using FreeType.  Let's discuss CFF/TrueType separately.  Read
https://bugs.freedesktop.org/show_bug.cgi?id=64766#c30 first to refresh.

    * TrueType: tryng to detect empty composites would mean loading glyf table
and reading every glyph.  This will disable any I/O gains, but will still
provide a speedup.  Alternatively, we can do what my previous patch did: detect
and ignore empty single glyphs, but don't worry about empty composite glyphs. 
That way we just read loca table and not glyf,

  * CFF: Implementing full loading is not feasible.  However, maybe we can
detect glyphs mapping to cid1 and only check that glyph.  For everything else
assume it's non-empty.  Another approach would be to load CharString INDEX and
use that to detect empty glyphs (1-byte charstring).  That's similar to using
loca table only.  Not sure if this detects any cases in the wild.

Then again, as Khaled has pointed out to me, this empty-glyph check is a
liability for fonts that want to decompose glyphs into components, as the
nominal glyph cannot be empty or fontconfig won't detect language coverage
correctly.

So, maybe it is time to let this test go...  I like to hear what others think
before going ahead and implementing this.  If we completely remove the check,
that should make fontconfig scanning, like, over 10 times faster easily...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20170718/c3f5f59b/attachment.html>


More information about the Fontconfig-bugs mailing list