-
Notifications
You must be signed in to change notification settings - Fork 54
[read-fonts] Add per-table feature flags #1658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Any reason not to include |
It's perhaps not obvious from the names, but "layout" is actually support code tables that deal with layout rather than the group of tables that deal with layout (the feature names match file/module names the Perhaps we should make that clearer by suffixing the names with |
I suspected that. Thanks for clarifying. I think it's fine. |
d5f53ec to
36a072b
Compare
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
c6edaf6 to
e2242ae
Compare
Signed-off-by: Nico Burns <nico@nicoburns.com>
4500309 to
3c109f2
Compare
Signed-off-by: Nico Burns <nico@nicoburns.com>
|
I feel like this isn’t going to be much of a win in practice. Doing anything useful with a font is going to require at least one of skrifa or harfrust, both of which need all of the expensive-to-compile tables. |
|
Seems suspicious that we enable the traversal feature by default: Line 19 in 237e696
Does disabling that have any measurable impact on compile times? |
I'm seeing a bit of variance ( |
|
Nice! I suggest we start by removing that as a default feature and then looking for ways to improve codegen before we start cutting up the code with features or crate splitting. |
I'm curious, are there users that only need these? - the consumers that come to mind for me would also typically need at least one of shaping, subsetting, and access to outlines. |
vigorous +1, lets push on this first. Reminds me, I'm curious if anyone observes a measurable improvement from #1661? - wasn't a clear win when I tried it. |



This dramatically reduces compile times for
read-fontsin cases where only a few tables are needed. Examples of cases where this applies includefontdbandfontiquewhich only need to read high-level metadata and don't need to access details like glyph outlines, shaping, or hinting data.Notes:
cargo checkwith each feature flag to ensure that they all compile independently of each other.