-
Notifications
You must be signed in to change notification settings - Fork 448
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
Merge CFF rebased #2447
Merge CFF rebased #2447
Conversation
I’m not getting duplicate |
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.
Thanks Khaled for picking this up. It's been a while since I have read this code, I left some comment below
LGTM. Thanks Khaled. |
b9e0b7f
to
fa0b30f
Compare
Lib/fontTools/merge.py
Outdated
# Rename CFF CharStrings to match the new glyphOrder. | ||
# Using cffTable before reloading the fonts, because reasons. |
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.
Using cffTable before reloading the fonts, because reasons.
a bit cryptic, perhaps intentionally so. But as far as I can tell, you are actually cffTable after reloading, so I'm even more confused by the comment.
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.
ah I now see. You are using the cffTable from the original fonts, before they have been reloaded. Ok, then why?
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.
Yes. I don’t fully understand what is going on, but if we don’t do this then duplicated glyphs gets messed up (they seem to be using the outlines from the first font) in the output font. This seems to be related to the font reloading step, if we stop doing this then all this becomes moot. My testing does not show any other difference with or without reloading.
@khaledhosny are you planning to add some minimal tests as well? |
I want to add tests, but merge module does not have any integration tests and I’m not sure unit tests will be very helpful here. If I can figure an easy way to add some integration tests, I’ll do that. |
fa0b30f
to
f7b462e
Compare
This reverts commit 6deeb70.
This way we can use it from both subset and merge modules.
The font is opened later, so use that.
I don’t know why this code was there, but my tests make no difference with or without it.
f7b462e
to
753a841
Compare
dc6db90
to
d7c3a96
Compare
We are not doing anything about subroutines (and there shouldn’t be any since the tables are desubroutinized), so this code is just making it look noisy.
f9095b1
to
1fa579f
Compare
Thanks Jeremie and Khaled! |
Rebased #1319, but had to remove
.notdef
non-duplication since it conflicts with the change made in #1729 and needs bigger change to do properly.TODO: