775 Commits

Author SHA1 Message Date
Miguel Sousa
8d9a935eaa [svgLib] Add support for polyline element 2019-04-03 12:02:36 -07:00
Miguel Sousa
d5adee46d9 [svgLib] Complete support for matrix transforms 2019-04-03 12:02:18 -07:00
Rod Sheeter
dedf14ac8a Roughing in transform=matrix(...) 2019-04-03 11:58:05 -07:00
Miguel Sousa
da6fe5f0e3
Merge pull request #1563 from fonttools/svgLib-ellipse
[svgLib] Add support for ellipse shape
2019-04-02 10:59:22 -07:00
Read Roberts
e782c6e9d2
Merge pull request #1551 from fonttools/VVAR-support
[varLib] Add support for building VVAR table from vmtx and VORG tables.
2019-04-02 09:38:22 -07:00
Miguel Sousa
e63598f944 [svgLib] Add support for ellipse shape 2019-04-01 22:50:24 -07:00
Miguel Sousa
2c54bf7910 Use existing method 2019-04-01 21:26:07 -07:00
Miguel Sousa
86cea23de3 Un-hardcode the CFF glyph's left side bearing 2019-04-01 21:25:27 -07:00
Miguel Sousa
b0710b829b [fontBuilder] Enable making CFF2 fonts with 'post' table format 2
Before this change all OTFs wound up with 'post' table format 3
2019-04-01 21:09:21 -07:00
Miguel Sousa
ddff29cb5d Fix DeprecationWarning: invalid escape sequence 2019-04-01 14:04:14 -07:00
Cosimo Lupo
8e9fac123c
instancer_test: add more unit tests for instantiateItemVariationStore 2019-03-29 13:00:27 +00:00
Cosimo Lupo
a8853997d5
instancer_test: start adding tests for instantiateItemVariationStore helpers 2019-03-28 19:32:05 +00:00
Cosimo Lupo
e6033a14da
instancer: drop region if axis scalar is 0
update VarData.VarRegionCount

also set StartCoord and EndCoord to 0 (same end result as only setting PeakCoord
to 0, but this produces less noise when inspeciting the generated XML dump)
2019-03-26 18:44:50 +00:00
Cosimo Lupo
2b746d6e50
instancer: unpack axis (start, peak, end) tuple instead of indexing at PEAK_COORD_INDEX
Makes it more readable
2019-03-25 13:41:41 +00:00
Cosimo Lupo
012d80db6d
instancer_test: added tests for MVAR table
I added an MVAR table to the PartialInstancer-VF.ttx test font with made-up deltas for
OS/2.yStrikeoutSize, post.underlinePosition and post.underlineThickness.
I defined 3 regions, one with only wght, one with only wdth, and one with both wdth and wght axes.
2019-03-25 13:19:38 +00:00
Cosimo Lupo
eff5a6310d
instancer_test: adjust expected cvar test result 2019-03-25 12:22:42 +00:00
Cosimo Lupo
05c22b9122
instancer_test: added tests for instantiateCvar 2019-03-25 11:09:46 +00:00
ReadRoberts
ecf738b964 Add support for building VVAR table from vmtx and VORG tables.
Add test case.
2019-03-21 10:06:47 -07:00
Cosimo Lupo
6281f87cb6 rename partialInstancer.py to instancer.py 2019-03-21 15:30:48 +00:00
Cosimo Lupo
2ee528e2fd Merge branch 'master' into partial-instancer 2019-03-21 15:26:27 +00:00
Cosimo Lupo
c6006a7f8c [glyf] remove_hinting should del program from composite glyph
Unlike simple glyphs, which always have 'program' attribute (even when empty, with no instructions)
in composite glyphs, it's the presence of 'program' attribute that determines whether
the optional WE_HAVE_INSTRUCTIONS component flag is set or not.
Thus, the trim method (with remove_hinting=True) should delete the attribute for
composite glyphs.

Fixes https://github.com/fonttools/fonttools/issues/1550
2019-03-21 12:16:54 +00:00
justvanrossum
12ec7f539e improve error message 2019-03-17 15:35:35 +01:00
justvanrossum
ac2413e905 [ttLib/glyf] raise TTLibError with the offending glyph name in the error message when a component (indirectly) references itself 2019-03-17 15:30:20 +01:00
Khaled Hosny
45861a15ca [feaLib] Reject invalid lookupflag without a value
Fixes https://github.com/fonttools/fonttools/issues/1538
2019-03-15 14:13:46 +02:00
Khaled Hosny
250eac4cae [feaLib] Correctly handle lookupflag 0 in asFea()
Part of https://github.com/fonttools/fonttools/issues/1538
2019-03-15 14:13:46 +02:00
Martin Hosken
27d8d1bda0 Update tests 2019-03-15 11:16:51 +07:00
Cosimo Lupo
126a2d9c38 Add partialInstancer_test.py and PartialInstancerTest-VF.ttx
Currently tests the instantiateGvar function only.
The test font contains two axes and a single glyph.
I shall make add more complexity later.
2019-03-12 19:44:33 +00:00
Nikolaus Waxweiler
5f7afa23b2 newDefaultLocation: Return location in design space 2019-03-10 22:20:00 +00:00
Nikolaus Waxweiler
c4899330c5 designspaceLib, findDefault: consider axis mapping 2019-03-10 22:12:06 +00:00
justvanrossum
24b45b6326 fix embedded license URL in name tables of test fonts 2019-03-06 17:20:40 +01:00
justvanrossum
7b81ef8de7 more updated issue URLs 2019-03-06 16:53:17 +01:00
justvanrossum
d897a08fc8 more updated issue URLs 2019-03-06 16:52:35 +01:00
justvanrossum
e22453c933 followup to #1531 2019-03-06 16:47:16 +01:00
Cosimo Lupo
df3bbbb7ad varLib: use hhea.ascent and head.unitsPerEM for phantom pts when vmtx missing
https://github.com/anthrotype/fonttools/pull/new/gvar-vmtx-phantom-pts
2019-03-05 10:02:35 -08:00
Cosimo Lupo
cf9f866943 varLib: fix expected test results after bottomSideY changed sign 2019-03-04 18:41:43 -08:00
Cosimo Lupo
71e44a52ee TupleVariation.toXML: sort attrs min/value/max in TTX dump
It's more legible if the peak value is written after the min and before the max value
defining a given region.
2019-03-04 16:41:26 -08:00
Cosimo Lupo
694b57754c
Merge pull request #1526 from anthrotype/varLib-models-tests
[varLib.models] minor tests cleanups
2019-03-04 16:34:43 -08:00
Cosimo Lupo
c813b65d32 models_test: test default 0.0 input locations are omitted internally 2019-03-04 12:38:32 -08:00
Cosimo Lupo
0811834b3c models_test: VariationModel input locations should be in normalized space
not only base should be at 0, but min/max respectively at -1.0 and +1.0.
that's how varLib constructs models internally, so update test case to reflect that
2019-03-04 12:31:08 -08:00
Cosimo Lupo
05824b8616 VariationModel: assert that locations are unique 2019-03-04 11:42:54 -08:00
Cosimo Lupo
b9aa815d06 models_test: bundle test methods under VariationModelTest class
in preparation for adding more unit tests to VariationModel class.
2019-03-04 11:03:34 -08:00
Cosimo Lupo
7e85782900 models_test: parametrize VariationModel tests
I noticed there were two functions called 'test_VariationModel', the second one
shadowing the first.
2019-03-04 11:00:11 -08:00
justvanrossum
7c319abbec remove some unused variables; test empty cmap for format 4 2019-03-03 11:59:59 +01:00
justvanrossum
d4a2d935c4 [cmap] changed some uses of list(map(...)) to list comprehensions an explicit loops, avoiding possibly large unneeded tmp lists; replaced use of oval() with int(); adding tests to verify all changes are covered 2019-03-03 10:30:05 +01:00
Khaled Hosny
c82fb8fa13 [feaLib] Support Python < 3.5 in previous commits 2019-03-01 01:48:48 +02:00
Khaled Hosny
7d03e93e67 [feaLib] Make unsupported "subtable" a warning
AFDKO’s makeotf warns and ignores the statement, so do the same. I’m
abusing FeatureLibError() as a lazy way to keep reporting the location.
2019-03-01 01:48:48 +02:00
Khaled Hosny
226f5518b7 [feaLib] "subtable" in single substitutions 2019-03-01 01:48:48 +02:00
Khaled Hosny
d9893ab05a [feaLib] "subtable" in multiple substitutions 2019-03-01 01:48:48 +02:00
Khaled Hosny
c87e5cf4ad [feaLib] "subtable" in alternate lookups 2019-03-01 01:48:48 +02:00
Khaled Hosny
7454a3eb48 [feaLib] "subtable" in ligature lookups 2019-03-01 01:48:48 +02:00