Garret Rieger
1bb3183231
Add tests for lazy loading of MVAR with more than 8 value records.
2021-04-21 14:37:47 -07:00
Behdad Esfahbod
bcd4a62f10
[TupleVariation] Use b'' instead of NotImplemented for "use shared points"
2021-04-09 12:16:15 -06:00
Behdad Esfahbod
ef0d695de9
[TupleVariation] Remove unused usesSharedPoints return from tv.compile()
2021-04-09 12:13:49 -06:00
Behdad Esfahbod
f7b66c7af2
[VariationData] Fix tests after recent changes
2021-04-08 18:31:24 -06:00
Behdad Esfahbod
1e6b20cc2c
[TupleVariation] Don't round deltas (again!)
...
Remove tests that passed float in.
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
e9acd9634f
[GlyphCoordinates] Store int data as 4byte, not 2byte
...
The memory increase is negligible, but means that we don't have to
worry about integer overflows anymore.
2021-04-08 09:41:45 -06:00
Cosimo Lupo
2136aac0f0
subset: fix pruning unused CPAL palettes when 0xFFFF is present
...
FIxes https://github.com/fonttools/fonttools/issues/2257
2021-04-06 19:43:45 +01:00
Zachary Scheuren
41da60f130
Add missing dict operators to CFF2
2021-03-30 21:24:14 +09:00
Cosimo Lupo
a4f42d3b18
subset_test: add tests for PairPos2 useClass0 #2221
2021-03-29 16:18:42 +01:00
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Chris Simpkins
7abf2e4c75
transition basestring
to str
...
https://github.com/fonttools/fonttools/issues/2232
2021-03-27 10:23:29 -04:00
Behdad Esfahbod
1e83650db8
[otlLib] Ensure built SinglePos ValueRecords are padded with 0s
...
Like when they are decompiled.
Part of https://github.com/fonttools/fonttools/pull/2237
2021-03-24 09:26:26 -07:00
Behdad Esfahbod
d961ef5e52
[otlLib] Ensure built PairPos2 ValueRecords are padded with 0s
...
Like when they are decompiled.
Part of https://github.com/fonttools/fonttools/pull/2237
2021-03-24 09:26:26 -07:00
Cosimo Lupo
b1ca16738c
[otlLib] Ensure built PairPos1 ValueRecords are padded with 0s
...
Like when decompiled.
See 2089d05126 (r48578120)
Part of https://github.com/fonttools/fonttools/pull/2237
2021-03-24 09:25:42 -07:00
Behdad Esfahbod
d0aaf1bceb
[feaLib] Set RangeStart/RangeEnd as float
...
Fixes the one failing test after previous commit.
2021-03-24 08:04:14 -07:00
Nikolaus Waxweiler
cc76169074
Test that G* table compilation does not change data
2021-03-24 07:58:42 -07:00
Behdad Esfahbod
2a483f9856
[Tests] Fix most test expectations for AlternateSubst .Format removal
2021-03-23 18:01:32 -07:00
Behdad Esfahbod
8f79235d00
[Tests] Remove hack after Coverage .Format removal
2021-03-23 11:44:13 -07:00
Behdad Esfahbod
d6bdfba587
[Tests] Fix more test expectations for SingleSubst .Format removal
2021-03-23 11:43:55 -07:00
Behdad Esfahbod
6b2b2f4949
[Tests] Fix most test expectations for ClassDef[12] .Format removal
2021-03-23 11:43:46 -07:00
Behdad Esfahbod
9ac1f39045
[Tests] Fix most test expectations for AlternateSubst .Format removal
2021-03-23 11:43:22 -07:00
Behdad Esfahbod
b62170e86d
[Tests] Fix most tests expectations for LigatureSubst .Format change
2021-03-23 11:43:15 -07:00
Behdad Esfahbod
61b06a7fe0
[Tests] Fix most tests expectations for SingleSubst .Format change
2021-03-23 11:43:03 -07:00
Behdad Esfahbod
de81aae164
[Tests] Fix more tests expectations for Coverage/ClassDef .Format change
2021-03-23 11:42:54 -07:00
Behdad Esfahbod
975f85ed72
[Tests] Fix most tests expectations for Coverage/ClassDef .Format change
2021-03-23 11:42:38 -07:00
Nikolaus Waxweiler
2089d05126
Merge pull request #2229 from fonttools/varLib-otlLib-noreload
...
[varLib/otlLib] Allow merging into VariationFont without first saving GPOS PairPos2
2021-03-22 16:42:45 +00:00
Nikolaus Waxweiler
30ade474dd
Update test data
2021-03-22 14:45:24 +00:00
Simon Cozens
23cb8b989b
More tests
2021-03-18 21:24:13 +00:00
Simon Cozens
8a6e3087ce
Use pytest exception handling
2021-03-17 11:55:51 +00:00
Simon Cozens
0a1aa19c39
Test for better error message
2021-03-15 13:12:11 +00:00
Cosimo Lupo
d80779d71e
py23_test: remove py27 test always skipped now
2021-03-11 18:23:26 +00:00
Behdad Esfahbod
062b7c434e
Merge pull request #2214 from fonttools/varLib-round
...
[varLib] Move rounding to VariationModel, to avoid error accumulation from multiple deltas
2021-03-04 16:40:40 -07:00
Behdad Esfahbod
ed6164a44f
[varLib.cff] Round deltas using bankers round as well
...
See https://github.com/fonttools/fonttools/pull/2214#issuecomment-790742479
Good news: this reverted the one CFF test that needed its expectation to
change when I started this patchset. Bad news: it introduced a couple other
diffs to the same glyph of the same test, which is consistent with changing
the rounding from otRound to round3.
2021-03-04 13:10:01 -07:00
Just van Rossum
6a8821d91c
Revert "Use Vector in some places where it improves the clarity of the code" ( #2215 )
...
* Revert most of "Use Vector in some places where it improves the clarity of the code (#2206 )"
This reverts most of commit 0d3ce2cafc6f604fc46d4d3bfbab34a5bc59e27b.
2021-03-04 20:15:24 +01:00
Behdad Esfahbod
68004b8fec
[varLib] Shift most (all?) delta-rounding to VarModel
...
Reduces error.
The main varfont-builder now asks the model to do rounding, and asks
VariationStore to do no rounding, so we don't spend extra times rounding
multiple times (specially with the heavy otRound).
I *think* I got it all and right...
Fixes https://github.com/fonttools/fonttools/issues/2213
2021-03-04 09:20:43 -07:00
Just van Rossum
0d3ce2cafc
Use Vector in some places where it improves the clarity of the code ( #2206 )
...
* Use Vector in some places where it improves the clarity of the code
* add __all__ to vector.py
* turned some list comprehensions into generator expressions: there's no need for an intermediate list in these cases
* Add empty __slots__ to Vector, so we don't waste space on a __dict__.
* add some tests for segmentPointAtT
2021-03-04 15:32:45 +01:00
justvanrossum
44b7560fe5
move Vector to its own submodule, and rewrite as a tuple subclass
2021-02-27 19:54:53 +01:00
justvanrossum
2429a187fc
Revert ABC changes to Pens, fixes #2198
2021-02-26 20:18:37 +01:00
Marc Foley
52fec53d20
Drop nameID 25 if instantiating a static font
2021-02-26 10:32:38 +00:00
Marc Foley
a7913ef50e
Add test for Regular fallback
2021-02-26 10:32:38 +00:00
Cosimo Lupo
2be13d50ac
make instancer into a package dir and move all names-related funcs to submodule
...
move instancer tests to Tests/varLib/instancer directory
create instancer/__main__.py to make package executable
2021-02-26 10:31:30 +00:00
Marc Foley
0280eb36cc
Parametrize updateNameTable tests
2021-02-26 10:19:43 +00:00
Marc Foley
336e7827e7
Implement Cosimo feedback
2021-02-26 10:19:43 +00:00
Marc Foley
29e4ff987c
instancer: implement Cosimo feedback
2021-02-26 10:19:43 +00:00
Marc Foley
0bcbbfdbb5
instancer: reuse existing instantiateSTAT func
2021-02-26 10:19:43 +00:00
Marc Foley
9a72311d19
instancer: refactor updateNameTable
2021-02-26 10:19:43 +00:00
Marc Foley
b328475072
wip instancer: update uniqueID
2021-02-26 10:19:43 +00:00
Marc Foley
ce1d8a9955
instancer: Add axisDefaults to axisLimits
2021-02-26 10:19:43 +00:00
Marc Foley
69c8667982
instancer: sort axisValues so format 4 are dominant for constructing names
2021-02-26 10:19:43 +00:00
Marc Foley
b4b1ce3579
instancer: include attribute axisValues
2021-02-26 10:19:42 +00:00