After subsetting some strikes might be empty (strikes don’t have to
cover all glyphs equally) which would cause a key error later when
saving the table.
Fixes https://github.com/fonttools/fonttools/issues/1633
[ttLib] Allow the glyf table to be incomplete (to not contain everything from the glyph order) when writing to XML. This partially addresses #684 in that it will allow the font Ambrosia.otb to be dumped with ttx (but not recompiled). Log a warning when a glyph is not present.
* Rename last to pos, and next to nextPos
* make sure nextPos is initialized, to avoid UnboundLocalError on an empty glyf table, partially addressing #684
Introduced in CFF2 table, but code does not limit it to CFF2 table. If
FDSelect format is set to 4, it will be read/written regardless of the
table version.
The T1 spec (https://www-cdf.fnal.gov/offline/PostScript/T1_SPEC.PDF) on
page 14 says that:
> The text encrypted by eexec must be followed by 512 ASCII zeros. There may be
> white space characters (blank, tab, carriage return or line feed)
> interspersed among these zeros.
* Add a failing test case with white space characters interspersed
among the trailing zeros after the eexec
* Fix eexec end finding so that it passes this new test case
When checking if there was an initial width argument, old logic did not correctly sum the number of blend and non-blend arguments before the first hint or moveto operator.
Added test case. Old logic dropped the arguments for the hmoveto in the last glyph.
I used FontValidator to validate the ttf font. I made some changes to address the errors. Now it passes, but still trying to preview the font in windows raises the same error.
* varLib.cff: Apply conv_to_int() to all the values
* varLib: Don't hardcode file extension to 'ttf'
Also remove unused imports
* varLib.cff: Fix merging of sparse PrivateDict items
Fixes#1651
When building a variable font, varLib.build must make sure that
the OS/2.usWeightClass is equal to the wght axis default location,
that the OS/2.usWidthClass is set to the equivalent value (1-9) of
the wdth axis default location, and finally that post.italicAngle
is set to the same default value as slnt axis.
Sometimes the base master doesn't have these values correctly
set leading to discrepancies between OS/2 and post, on the one
hand, and the fvar axes' default values.
Fixes#1650
A regression was introduced with 3.43.0 when doing pyftsubset --flavor=woff2
and the input font is WOFF 1.0, thus it has a non-None flavorData already
but doesn't define the transformTables attribute.
isPairPos and isSinglePos are mutually exclusive and isSinglePos is only defined if isPairPos is False
so it is safe to use it in 'else' or 'elif' branches (logical expressions short-circuit)