1512 Commits

Author SHA1 Message Date
Behdad Esfahbod
743033d755 [instancer.solver] Use pytest.approx() in tests 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
e7d4416c27 [instancer.solver] Add more tests 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
52c791ad1d [instancer.solver] Add a special case 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
b6a3ef37e1 [instancer.solver] Second try at sending everything through WithGain 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
c3fa1b59ac [instancer.solver] Return None as gain tent 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
a87ba55a90 [instancer.solver] More test 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
340fb5866c [instancer.solver] More test 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
dd5452527e [instancer.solver] More fixes 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
264ac96288 [instancer.solver] Improve test 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
4637daf191 [instancer.solver] Fix 3a 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
bb94fe0df2 [instancer.solver] One more test 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
8a49fdc4ec [instancer.solver] Fix up algorithm again 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
6210e7d331 [instancer.solver] Test more 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
f2ebccd468 [instancer.solver] Add tests 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
89dffd51ca [instancer] Make some tests pass
The rest of the test suite needs drastic updates :(.
2022-10-13 10:35:02 -06:00
Just van Rossum
8b8fbf390e formatting 2022-10-13 12:56:04 +02:00
Just van Rossum
2afac999ef Add test for VariationModel with extrapolate=True, and test a two-dimensional designspace for expected interpolation values 2022-10-13 12:50:21 +02:00
Just van Rossum
b073fb8f6f Demand axisRanges is given when extrapolate is True 2022-10-13 12:27:46 +02:00
Just van Rossum
16183b9436 Adjust extrapolate test cases, and added some for extrapolating below the minimum 2022-10-13 09:03:42 +02:00
Behdad Esfahbod
4742960f7f [varLib.cff] Don't round deltas
Fixes https://github.com/fonttools/fonttools/issues/2838
2022-10-04 14:12:01 -06:00
Behdad Esfahbod
5a9b044617 [scaleUpem] Fix test 2022-10-04 12:43:39 -06:00
Jack McCabe
eeba234ee0 [subset] PR feedback implementation 2022-09-30 15:59:11 +01:00
Jack McCabe
14ce08bd75 [subset] extend CPALv1 test 2022-09-30 15:41:14 +01:00
Jack McCabe
70112b947d [subset] prevent CPAL nameIDs from being dropped 2022-09-30 12:36:28 +01:00
Jack McCabe
4901deab76 [subset] Add test for CPALv1 (failing !) 2022-09-30 12:10:56 +01:00
Cosimo Lupo
ea534a4ecf
unicodedata: Update Scripts/Blocks to Unicode 15.0
by re-running the MetaTools/buildUCD.py script using the current UCD
database.
2022-09-23 10:42:55 +01:00
Just van Rossum
6e6b86d41a [ttGlyphSet] Add comment to clarify the test 2022-09-20 11:17:58 +02:00
Just van Rossum
fa4a5f33b4 Add test case 2022-09-20 10:54:09 +02:00
Cosimo Lupo
87bbb64061
[instancer] downgrade GSUB/GPOS version if there are no FeatureVariations after instancing
same as https://github.com/fonttools/fonttools/pull/2811 but moved the logic to _instantiateFeatureVariations directly, instead of after it
2022-09-13 10:44:26 +01:00
Cosimo Lupo
964df076e1 varLib_test: test we don't add no-op DeltaSetIndexMap when not needed
https://github.com/fonttools/fonttools/issues/2800
2022-09-05 17:15:51 +01:00
Simon Cozens
64fd837ca1
Allow multiple value record types in the same pairpos table (#2776)
* Use buildPairPosClassesSubtable's ability to promote value records (see #2772)

* Add tests for #2772
2022-09-05 14:44:50 +01:00
Harry Dalton
bbb26c2cea Confirm split functions can handle unbounded conditions with absent keys
As we make an effort to support conditions with "minimum" or "maximum"
absent, as well as with "minimum" or "maximum" None, this commit
confirms that the split functions can handle these to some degree also.
2022-09-01 17:34:51 +01:00
Harry Dalton
d1ec8e6979 Test that DS5 splitting code handles unbounded conditions gracefully
Conditions with unbounded values have a "minimum" or "maximum" value of
None.

These tests check that:
a) The public-facing split functions can receive None values without
     crashing; and
b) That their internal helper functions correctly translate the None
     values to math.inf and -math.inf to express them.

These tests are expected to fail, indicating where a fix is required.
2022-09-01 13:41:44 +01:00
Miguel Sousa
1306a71db3
Merge pull request #2786 from fonttools/msousa-bad-post-format-1
Don't crash when `post` format 1 is improperly used
2022-08-31 08:52:49 -07:00
Miguel Sousa
96c9250cf8 Update warning message [skip ci] 2022-08-31 08:52:17 -07:00
Cosimo Lupo
36de9df3cc [gvar] be non lazy for TTFont.lazy=False, add ensureDecompiled
like cmap, or glyf or OTL tables, we need to respect lazy=False flag and decompile everything upfront, also we want to add an ensureDecompiled method (called by TTFont.ensureDecompiled) to allow loading everything in one go even when a font had been opened lazily.
2022-08-31 11:10:50 +01:00
Miguel Sousa
a2efac012c Add warning log 2022-08-30 23:56:03 -07:00
Miguel Sousa
0e9c48e6ab Don't crash when post format 1 is improperly used
Fixes #2736
2022-08-30 09:14:03 -07:00
Just van Rossum
b1441c583b Add test for non-VF exception 2022-08-30 09:26:16 +02:00
Just van Rossum
da539e5c4d use fixture for test font 2022-08-30 08:56:24 +02:00
Just van Rossum
86e4f2bf94 test file for font.normalizeLocation() 2022-08-30 08:49:36 +02:00
Just van Rossum
d2f0611fea test font.normalizeLocation() 2022-08-30 08:49:36 +02:00
Just van Rossum
d5db47e09d minor cleanup 2022-08-30 08:49:36 +02:00
Just van Rossum
b818e1494f Refactor ttGlyphSet.py
- only differentiate between glyf and CFF/CFF2 implementations, not var vs non-var
- use collections.abc.Mapping to get a more consistent dict-like object with less code
- prefer HVAR metrics over gvar metrics
- move some responsibilities from the _TTGlyphSet objects to the _TTGlyph objects
- adjust some tests to the changes
2022-08-30 08:49:36 +02:00
Behdad Esfahbod
b3d6868516 [ttGlyphSet_test] Test CFF2 variations 2022-08-26 21:42:14 -06:00
Behdad Esfahbod
f0f7b93f11 [varLib.models_test] Add test
from https://github.com/fonttools/fonttools/issues/2764
2022-08-23 10:32:57 -06:00
Cosimo Lupo
f5933c1cfa Revert "[varLib.models] Generate narrower tents"
This reverts commit 688939394b8cae3b2a0d5747e435cbd828a14531.
2022-08-23 17:20:57 +01:00
Behdad Esfahbod
bad70c68ef [varLib] Support extrapolation
Fixes https://github.com/fonttools/fonttools/issues/1252
2022-08-23 09:56:33 -06:00
Cosimo Lupo
0adc164355
Merge pull request #2762 from fonttools/var-glyph-set-inheritance
[ttGlyphSet] Inherit ttVarGlyphSet from ttGlyphSet
2022-08-22 17:24:05 +01:00
Cosimo Lupo
320cbf7c47 [ttGlyphSet] Inherit ttVarGlyphSet from ttGlyphSet
Fixes #2759
2022-08-22 17:07:31 +01:00