Skip to content
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

Opentype gx #670

Merged
merged 6 commits into from
Sep 27, 2016
Merged

Opentype gx #670

merged 6 commits into from
Sep 27, 2016

Conversation

readroberts
Copy link
Collaborator

When running my CFF2-capable cffLib.py over the Adobe Type library, and comparing the CFF 1.0 output with the main-branch cffLib.py version, I found a few issues in the original code. All simple fixes, fortunately.

…only the two-bye count field. Code was also writing the final sentinel offset in the offset list, even though there were no items. This is harmless, but adds a couple useless bytes. Also fixed the calculation of the offset size in the CFF header. Again harmless, since this value isn't used anywhere, but makes it harder to compare CFF's built by different tools.
…d logic was reading/writing using TopDict methods, and items like the CIDFontName and Encoding were getting written to XML, and back into the compiled FontDict data. Fixed by defining a list of operators supported in FontDict objects, which is a subset of the TopDict operators, and referencing these in the FontDict object methods.
@coveralls
Copy link

Coverage Status

Coverage decreased (-5.8%) to 64.754% when pulling f925eb8 on readroberts:opentype-gx into 6e3b7ca on behdad:opentype-gx.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.6%) to 65.883% when pulling 71093ff on readroberts:opentype-gx into 6e3b7ca on behdad:opentype-gx.

…ied in an OTF CFF ( TopDict.charset < 2),, the charset was always filled with the entire predefined charset, instead of charset[:nGlyphs]. Also added logic to write a predefined charset code instead of a custom charset when that is possible: this was not happening before.
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.5%) to 65.99% when pulling 81607cb on readroberts:opentype-gx into 6e3b7ca on behdad:opentype-gx.

…CFF predefined charset when possible. This is not allowed In CID fonts. Added a test to NOT do this when font is CD. 2) Added exception handler when reading FontDict XML to skip unknown fields. In previous versions, all the default key/value pairs for the TopDict were (incorrectly) written to FDArray FontDicts. New logic does not do that, but also should not fail when it sees any of these key/value pairs. 3) Changed the expected txt files for some of the subset tests. For the CID example, this meant removing the unnecessary key/value pairs from the FDArray FontDicts. For all, it meant adding the major.minor CFF version fields.
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.2%) to 66.285% when pulling 69475de on readroberts:opentype-gx into 6e3b7ca on behdad:opentype-gx.

@behdad behdad merged commit a5dc736 into fonttools:opentype-gx Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants