8000 feaLib shouldn’t ignore subtable statements · Issue #1279 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feaLib shouldn’t ignore subtable statements #1279

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

Closed
moyogo opened this issue Jun 21, 2018 · 4 comments
Closed

feaLib shouldn’t ignore subtable statements #1279

moyogo opened this issue Jun 21, 2018 · 4 comments

Comments

@moyogo
Copy link
Collaborator
moyogo commented Jun 21, 2018

The AFDKO syntax spec says:

4.g. subtable
The feature file implementation must insert subtable breaks among the rules for a particular lookup if needed. For example, if a set of alternate substitution rules specified in the feature file exceeds the subtable size limit, several subtables must be automatically created.

The "subtable" statement may be used as follows:
subtable;
to explicitly force a subtable break after the previous rule.

This is intended for use with only Pair Adjustment Positioning Format 2 (i.e. pair class kerning). See 6.b.iii for details. This hint to the compiler is required for class kerning, as it is difficult for a compiler to determine where to best place a subtable break in this lookup type, in order to reduce lookup size.

I tested writing a kern feature lookup with inserted subtable statements. As is, fonttools generates GPOS that is 94114 bytes for one of our fonts. If it was applying the subtable statements the GPOS would be 55712 bytes.

@miguelsousa
Copy link
Collaborator

Judging from comments that Behdad has made about the results of otf-making-benchmark I don't think it's the ignoring of subtable that's causing the significant size difference; makeotf uses some tricks to reduce the size of GPOS that are not implemented in feaLib.

@miguelsousa
Copy link
Collaborator

@moyogo see adobe-type-tools/otf-making-benchmark#1
I haven't had any time to dedicate to this project unfortunately.

@moyogo
Copy link
Collaborator Author
moyogo commented Jun 25, 2018

I think these are two separate issues. While a lookup without any subtable statements should be compiled as efficiently as possible, a lookup with subtable statements should be compiled as specified.

@anthrotype
Copy link
Member

it's in the spec, so I guess we should support manual subtable breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0