1242 Commits

Author SHA1 Message Date
Nikolaus Waxweiler
d8bf4c3123 Fix typo to actually transfer font references 2022-04-26 10:15:37 +01:00
Cosimo Lupo
350f893e17 [otBase] demote repacker ERROR to WARNING, only 1 per loop; don't exit at firstfail
Fixes https://github.com/fonttools/fonttools/issues/2594
2022-04-22 19:05:54 +01:00
Cosimo Lupo
f68ce14d7a [otBase] log the name of uharfbuzz exception 2022-04-22 15:31:34 +01:00
Cosimo Lupo
4217384e81 subset_test: ignore_errors in rmtree when tearing down tempdir
should fix random test failures like
https://github.com/fonttools/fonttools/runs/6127120342?check_suite_focus=true
2022-04-22 11:46:07 +01:00
Cosimo Lupo
ee2d83d4b3 [merge] use recalcXAvgCharWidth method on merged font
Fixes #2538, supersedes #2590
2022-04-21 18:56:05 +01:00
Cosimo Lupo
af6804bed5 make USE_HARFBUZZ_REPACKER a 3-state option, defaults to auto
if explicitly enabled, it will raise ImportError if uharfbuzz is not found, and will propagate the uharfbuzz error instead of silently falling back to the pure-python serializer
2022-04-21 18:11:20 +01:00
Cosimo Lupo
e9bec87d1a [configTools] Make Option eq=False so cmp/hash by id 2022-04-21 16:21:53 +01:00
Cosimo Lupo
4160f05242 [subset_test] test disabling hb repacker, and capture logging 2022-04-21 15:46:12 +01:00
Cosimo Lupo
e5d674ea5e [configTools] accept either str or Option in Config mapping API 2022-04-21 15:46:12 +01:00
Cosimo Lupo
9a0dfbd403 [configTools] add copy constructor to Options 2022-04-21 14:31:58 +01:00
Cosimo Lupo
f6e212cc2d subset_test: mock hb.repack raising an error to test pure-python fallback 2022-04-19 15:40:58 +01:00
Cosimo Lupo
822bbb2c69 subset_test: remove unused return value 2022-04-19 15:40:58 +01:00
Cosimo Lupo
60d2727a9b subset_test: convert from unittest to pytest-style tests 2022-04-19 15:40:58 +01:00
Cosimo Lupo
e92dd05101
Merge pull request #2552 from qxliu76/add_hb_repack
Use Harfbuzz Repacker for packing GSUB/GPOS tables
2022-04-14 20:03:18 +01:00
Qunxin Liu
fe196bf88e Use Harfbuzz Repacker for packing GSUB/GPOS tables 2022-04-14 10:42:50 -07:00
Jany Belluz
268fbac85c [config] Add tests 2022-04-14 15:23:22 +01:00
Jany Belluz
2ea5dc3496 [varLib] Add support for designspace 5 + STAT generation + tests 2022-04-14 15:05:50 +01:00
Jany Belluz
a7974986c3 [designspaceLib] Add designspace 5 tests 2022-04-14 15:04:38 +01:00
Just van Rossum
169731c7f5
[CFF/T2] Ensure that pen.closePath() gets called for CFF2 charstrings (#2577)
* [CFF/T2] Make sure to call pen.closePath() at the end of a CFF2/T2 charstring. Fixes #2455

* Add test case to verify pen.closePath() behavior
2022-04-09 14:50:59 +02:00
Simon Cozens
2d62a2ac9e
Disable GSUB5 optimization (#2540)
* Disable GSUB5/GPOS7 optimization

* Revert "Fixup test expectations"

This reverts commit 7db13c9872884772312727e3478fb36ed9883004.

* Revert "Rename GPOS8->GPOS7"

This reverts commit 6d4c5fe31c9199e6d3e46cd0808e7640d1610e75.

* Revert "Fix varlib test expectations - now badly named."

This reverts commit 4adea942cc73b6afe58e00278da6cb3795935970.

* Allow GSUB5, disable GPOS7

* Revert "Revert "Fixup test expectations""

This reverts commit 42993ae6917f8f6e4c31f4be123caca24d27d2da.

* Fix up expectations
2022-04-08 15:54:34 +01:00
Cosimo Lupo
7ee2c9d891 testTools: factor our method to strip variable items from ttx dumps
it was scattered here and there, so define it once and reuse everywhere needed
2022-04-05 18:34:30 +01:00
Khaled Hosny
47457b14d6
[varLib] Fix instantiating some SinglePos subtables (#2555) 2022-03-22 08:34:18 +00:00
Cosimo Lupo
315705a58f [subset] fix subsetting OT-SVG when glyph id attribute is on the root <svg> element
Fixes https://github.com/fonttools/fonttools/issues/2548
2022-03-18 13:18:53 +00:00
Cosimo Lupo
6e0cebc487 ttFont_test: add test for ensureDecompiled 2022-03-17 17:13:50 +00:00
Cosimo Lupo
83ee6bcdab ttCollection: don't close file inside init if lazy=True
Fixes 'seek of closed file' error #2549
2022-03-17 12:30:40 +00:00
Cosimo Lupo
e1b3bfc807 ttCollection_test: check loading TTCollection with lazy attribute
currently lazy=True fails with 'ValueError: seek of closed file'
2022-03-17 11:43:11 +00:00
Cosimo Lupo
e726217ae0 ttFont_test: add test for setGlyphOrder updating glyf.glyphOrder 2022-03-10 17:43:02 +00:00
Cosimo Lupo
c2ad857050
Merge pull request #2528 from moontypespace/improve_buildStatTable
Add windowsNames and macNames parameters to buildStatTable
2022-02-11 18:23:54 +00:00
Olli Meier
61ad06fc3a rename unittest with better name + get rid of redundant code 2022-02-11 17:51:52 +01:00
Olli Meier
86e4795405 As requested: black Tests/otlLib/builder_test.py 2022-02-11 15:58:34 +01:00
Olli Meier
3b1fac049d Renamed unittest as requested by anthrotype 2022-02-11 15:56:03 +01:00
Olli Meier
1d51bc2b8e Changes as requested by Just. 2022-02-11 15:55:25 +01:00
Olli Meier
68fa3bbd47 Cleaning code based on feedback from Just 2022-02-10 22:13:58 +01:00
Olli Meier
384415f573
Update Tests/ttLib/tables/_n_a_m_e_test.py
Co-authored-by: Just van Rossum <justvanrossum@gmail.com>
2022-02-10 21:59:39 +01:00
Olli Meier
4a0b559caf
Update Tests/ttLib/tables/_n_a_m_e_test.py
Co-authored-by: Just van Rossum <justvanrossum@gmail.com>
2022-02-10 21:59:29 +01:00
Olli Meier
e968e8fd7f Based on the discussion with Just and anthrotype: Undo the changes in the name table and extend unittests. If there are inconsistencies in the name table, it's ok to create new name IDs, even if this might not be the most efficient way of creating the name table. 2022-02-10 21:24:51 +01:00
Olli Meier
ad1d82f810 Some more changes. Not sure about this. 2022-02-10 17:56:42 +01:00
Olli Meier
51eda21b0a Adding more unittests, based on feedback. 2022-02-10 17:11:26 +01:00
Olli Meier
6bf842a30e Reduce unittest content and update description. 2022-02-10 16:31:17 +01:00
Olli Meier
9028a53d3b based on feedback 'anthrotype' I use 'windowsNames' and 'macNames' in STAT table functions and 'windows' and 'mac' in name table functions. 2022-02-10 15:57:56 +01:00
derwind
b437417b71
Added the ability to recreate the PS stream (#2504)
* added the ability to recreate the PS stream

This fixes #2503
2022-02-10 15:53:12 +01:00
Olli Meier
6014cd8ae5 based on Just Van Rossum's feedback: replace variables. 2022-02-10 15:39:51 +01:00
Olli Meier
7f21d5eee3 adding variable platforms 2022-02-10 15:14:20 +01:00
Olli Meier
0f17da0836 Bugfix: The script to create a STAt table created multiple unnecessary name table entries, because it did not take care a bout existing entries with the same name. 2022-02-10 13:44:42 +01:00
Olli Meier
62bc692da1 adding description 2022-02-10 13:09:27 +01:00
Olli Meier
01ba5394fb Create failng unittest first. 2022-02-10 13:07:37 +01:00
Olli Meier
1649973800 Make use of 'Best' in names 2022-02-09 17:44:28 +01:00
Olli Meier
1a16b24cd5 Fix unittests 2022-02-09 17:17:11 +01:00
Olli Meier
17f4b76714 remove wrong test file. 2022-02-09 17:07:32 +01:00
Olli Meier
c50f38ed0e extend name table with getFamilyName, getSubFamilyName and getNiceFullName + unittests 2022-02-09 17:06:02 +01:00