-
Notifications
You must be signed in to change notification settings - Fork 8
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
re-subroutinizing SourceSansPro-Regular.otf yields slightly bigger file #9
Comments
/cc @khaledhosny who is our only known user so far |
Source Sans Pro uses makeotf, so it might be difference from makeotf subroutinizer. |
I'm looking into this so I can explain in more detail but basically what @khaledhosny is the root of it: Source Sans Pro was built with On a related note: I built the latest SSP (from |
Historical note: I ported tx's faster subroutinizer code to makeotf in AFDKO PR #882, which went out in AFDKO 3.0.0. Prior to that, makeotf used different subroutinizer code. |
As Josh mentioned, the tx and makeotf subroutinizers are nearly identical (since AFDKO 3.0.0). If anyone wants to compare them, they are in these two files: |
Thank you for the insights. In cffsubr I am calling tx with the option to keep the order, I thought it would be required to ensure that I can then reinsert the modified cff table back in the sfnt container. But maybe that's not the case and I can let tx find the most optimal order? |
You definitely need the |
Yeah, what @cjchapman said. Don't remove To reiterate: the difference in the subroutinization result seems to be caused by the order in which glyphs are analyzed for subroutinization -- which is not necessarily the font's glyph order (I'm working up a test case to demonstrate/prove/describe this in detail). |
Some additional information and data for this:
I've attached some test files that support the above (I did not bother trying to prove To sum up: the difference in this particular case is because the font's glyph set is not in Adobe Standard Encoding order. |
Thanks for the analysis.
Any particular reasons why tx and makeotf should differ in this regard? |
I noticed those too. In paticular, Another difference is that |
If FamilyBlues and FamilyOtherBlues have the same values as BlueValues and OtherBlues, it's correct to not include the Family set in the font. As for the usage of ExpertEncoding, I find that strange. Not sure what consequences it may have. |
I don't know for sure; this all happened way before my time at Adobe and I think the people who made those decisions are not around anymore. My guess would be because Adobe Standard Encoding provided a consistent starting point for compressing the character/glyph sets that were popular at the time this scheme was developed (in
I suspect that's an anomaly from the somewhat unusual set that I chose for this experiment. Probably Bringing all of this back around to A shorter-term workaround might be to see if we can extract only the relevant data from the |
I tried downloading SourceSansPro-Regular.otf and run
python -m cffsubr
on it.Comparing the resulting CFF table, I see that the original table is smaller than the one produced after running cffsubr.
I was wondering why this is the case?
Is SourceSansPro-Regular using some different library to do the subroutinization than the one used by
tx
tool? Or is it passing different options that I am not aware of?How do you explain the diff?
The text was updated successfully, but these errors were encountered: