-
Notifications
You must be signed in to change notification settings - Fork 27
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
[write-fonts] Fix miscalculation of ppf2 subgraph size #610
Conversation
write-fonts/src/graph/splitting.rs
Outdated
// let's have single class1class, and three class2 classes | ||
// we want a duplicate varidx, a null varidx, and a device table? | ||
|
||
fn make_val_record( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional, this would be easier to read hoisted out like make_class_def.
It's also hard to tell what the args are in the code. What if it took only the advance so this:
make_val_record(5, None),
make_val_record(6, DeviceOrVariationIndex::variation_index(4, 20)),
read more like this:
val_with_xadvance(5),
val_with_xadvance(6).with_x_advance_device(DeviceOrVariationIndex::variation_index(4, 20)),
make_class_def is similar, what's a class def 3,3,1?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is defined inline since it's only used in this one test, whereas make_class_def is shared. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM subject to comments being addressed
I had run into a problem here that I didn't have time to dig into last week. It turns out were incrementing the current index only when the subtable had not been seen before, which meant we would never advance the index and would not visit all subtables.
9dcf366
to
b7a2d28
Compare
I had run into a probley friday afternoon that I didn't have time to dig into, and I didn't want to block on getting fontc working again. This fixes that.
It turns out were incrementing the current index only when the subtable had not been seen before, which meant we would never advance the index and would not visit all subtables.