-
Notifications
You must be signed in to change notification settings - Fork 168
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
Issue354 fixes #467
Issue354 fixes #467
Conversation
… lots of hints to CFF2. t2cCtx *h->stack.blendArgs was sized as 6 elements. The max number of operands in a T2 charstring (other than for the blend op) is actually 96, aka T2_Max_STEMS.
…hints". Also fixed bug in writing CFF2 In writing test for issue 354, discovered that tx was writing the CFF2 var store incorrectly when writing a CFF2: it was adding the var store offset twice during offset calculations.
Tests/tx_test.py
Outdated
# tx defined an array of only 6 operants. | ||
# This is encountered only when wrinting to a VF CFF2. | ||
actual_path = runner(CMD + ['-o', 'cff2', '-f', 'cff2_vf.otf']) | ||
actual_path = runner(CMD + ['-f', actual_path, '-o', 'dcf']) |
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.
I think you need to use -a
option in this second call to runner
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.
Don't use actual_path
twice, because in case of failure it may be less clear which one is
This is why I think adding tests is always a good thing. |
Tests/tx_test.py
Outdated
# This is encountered only when wrinting to a VF CFF2. | ||
actual_path = runner(CMD + ['-o', 'cff2', '-f', 'cff2_vf.otf']) | ||
actual_path = runner(CMD + ['-f', actual_path, '-o', 'dcf']) | ||
expected_path = _get_expected_path('cff2_vf.dcf.txt') |
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.
you did not include this file (cff2_vf.dcf.txt) in the commit
…any hints". Also fixed bug in writing CFF2 Prior change fixed issue for fonts without FDSelect, but not for fonts with FDSelect. Now works with both.
…ny hints". Added the expected output file, which I omitted from prior commits. Added modified OTF input file Changed test function per suggestions from msousa.
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.
These changes broke tx's test_varread_pr355
.
} | ||
if (font->size.VarStore > 0) { | ||
font->offset.VarStore = h->offset.varStore; | ||
} |
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.
fix indents
if (h->size.FDSelect > 0) { | ||
h->offset.FDSelect = offset; | ||
offset += h->size.FDSelect; | ||
} |
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.
more indent fixes needed
cffwrite.c Restore indent to tab, same as surrounding indentation, in several lines Update the expect output file Tests/tx_data/expected_output/cff2_vf.pfa to match updated input file cff2_vf.otf
fixed whitespace issues reported by flake8
Add test for issue 354 " Fails to dump a CFF2 VF font with many hints". Also fixed bug in writing CFF2
In writing test for issue 354, discovered that tx was writing the CFF2 var store incorrectly when writing a CFF2: it was adding the var store offset twice during offset calculations.