37 Commits

Author SHA1 Message Date
Behdad Esfahbod
975f85ed72 [Tests] Fix most tests expectations for Coverage/ClassDef .Format change 2021-03-23 11:42:38 -07:00
Nikolaus Waxweiler
03655e55d3 Change test data to make it pass 2021-01-13 16:30:46 +00:00
Nikolaus Waxweiler
586144442d Add test 2021-01-12 17:21:22 +00:00
Khaled Hosny
d8e546df5f [subset] Allow LangSys tags in --layout-scripts
Allow specifying which LangSys tags to accept for each script, using
script.lang form. For example:

    --layout-scripts=arab.dflt,arab.URD,latn

To keep DefaultLangSys and “URD” language for “arab” script, and all
languages for “latn” script.
2020-11-20 23:38:29 +02:00
Cosimo Lupo
8bbf30d569
subset_test: add subset of Iosekva-Medium.ttf with ContextSubstFormat3 2020-05-11 18:32:32 +01:00
Khaled Hosny
4db8cb237f [subset] Support sbix table
Test font is a subset of:
https://github.com/djrrb/Bungee/blob/master/fonts/Bungee_Color_Fonts/BungeeColor-Regular_sbix_MacOS.ttf
2019-08-01 01:52:38 +02:00
Cosimo Lupo
33fa149c31
subset: Add tests for --flavor option 2019-06-19 11:32:34 +01:00
Khaled Hosny
a56b1af2f6 [subset] Gracefully handle partial MATH table (#1635)
Both MathGlyphInfo and MathVariants can be None, so check for that first
before trying to access their methods.
2019-06-08 17:59:53 -07:00
Garret Rieger
dce15980fd Make --retain-gids truncate empty glyphs after the last non-empty glyph. 2019-05-16 10:13:33 -07:00
Khaled Hosny
b1999a1a0e Add test for previous commit 2019-05-03 01:14:09 +02:00
Michiharu Ariza
00dddb1c32 fixed non retain-gids with no AdvWidthMap behavior
deltas in VarData[0] are directly look up by GID so compacted
if any deltas are referenced by LsbMap / RsbMap but not used for advance widths, they are moved to the end of VarData[0]

updated expected test result expect_HVVAR.ttx accordingly
2019-04-24 16:46:21 -07:00
Michiharu Ariza
f028c75d2a issue #1587: AdvWidthMap null with Lsb/RsbMaps non-null
along with tests
2019-04-23 17:03:04 -07:00
Read Roberts
7ae6ca8106 [subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [subset CFF] Fix bug in de-subroutinizing when subroutines contain hints, issue 1493

The  code was skipping executing a subroutine if it had already been desubroutinized. The initial set of vstemhm and hstemhm operators and values may be in a subroutine. If a charstring is being executed which calls such subroutines, they still need to be executed in order to count the number of hint values seen, so that the byte length of the hintmask can be calculated.

I fixed this bug by executing subroutines even if they have already been desubroutinized, as long  as  (we don't know yet if we are doing hintmasks) or ( we do need a hintmask, but have not yet seen it).

Clean up code per Cosimo's suggestions:

In arg list for stop_hint_count(), use *args to accept unused argument, rather than a dummy positional argument.

Change stop_hintcount_ops to a from a global variable to a class variable  in _DesubroutinizingT2Decompiler.

Remove un-needed 'return' at line 387

Remove duplicate assignment of cs at line 437

Add patch for the bug where AttributeError is encountered when remove_hints is run after desubroutinize: remove lines deleting the GlobalSubrs for each FontDict. This always needed to be done only once, and is now in any case done in cff.GlobalSubrs.clear(), at the end of the desubroutinize() function.

Changed test case subset_test.py::'test_no_hinting_desubroutinize_CFF' to reference a font with a non-empty GlobalSubr, in order to trigger AttributeError traceback.
2019-02-18 09:43:27 +00:00
Cosimo Lupo
18bd9603a9
[Tests] fixup for new subset default --name-IDs
25d3822275c04169ba380393b1d41c7605c61d58
2018-02-16 18:11:59 +00:00
Miguel Sousa
5eebad29df [subset_test] Include nameIDs 3, 4, 6 in results 2018-02-11 18:00:34 -08:00
Cosimo Lupo
bbcb3776ac [Tests/subset] adjust expected test results 2017-11-27 19:37:56 +00:00
Sascha Brawer
898f6911f8 [AAT] Implement subsetting of anchor points table 2017-08-31 12:49:55 +02:00
Sascha Brawer
307d0d4c57 [AAT] Implement subsetting of baseline table 2017-08-26 09:53:04 +02:00
Sascha Brawer
16a4001901 [AAT] Implement subsetting of lcar ligature carets table 2017-08-25 07:35:13 -07:00
Sascha Brawer
84b0cacf95 [AAT] Implement subsetting of opbd Optical Bounds table 2017-08-22 14:36:05 -07:00
Sascha Brawer
28b179a018 [AAT] Implement subsetting of prop table with AAT glyph properties 2017-08-22 08:06:59 -07:00
Denis Moyogo Jacquerye
6d07d48846 Upate CFF tests for default for UnderlinePosition
Missing UnderlinePosition added in a72f26e5
2017-06-09 07:03:54 +01:00
Sascha Brawer
017fa4e9c6 [fvar] Expose flags in XML
Fixes https://github.com/fonttools/fonttools/issues/932.
2017-05-02 00:51:44 +08:00
Miguel Sousa
306882a00a [tests] Change hhea and vhea table version from float to hex to mute fontTools warnings 2017-02-28 16:35:13 -08:00
Masaya Nakamura
7ac8c32274 [Tests/subset] Add a test case for .notdef glyph width (#845) 2017-02-16 13:58:49 +09:00
Cosimo Lupo
f7a5d83cbb
[Tests/subset] make the test pass: we can now drop empty subroutines! 2017-02-15 01:19:12 -08:00
Cosimo Lupo
489db26da9
[Tests/subset] we still don't remove empty subroutines; adjust test data 2017-02-15 00:42:45 -08:00
Cosimo Lupo
1ec6d30aa9
[Tests/subset] add failing test case: we still drop drawing instructions before the first hintmask... 2017-02-15 00:22:49 -08:00
Cosimo Lupo
aca7dd7db3
[subset] we don't remove empty subroutines (yet) 2017-02-15 00:17:50 -08:00
Cosimo Lupo
3a8f976cfe
[subset_test] add two test cases for subr starting with hintmask, one acting as implied vstem, the other occurring after path drawing operations 2017-02-14 23:00:17 -08:00
Cosimo Lupo
c234e3606c
[data/expect_no_hinting_TTF.ttx] adjust data using empty instructions elements 2017-01-25 15:35:16 +00:00
Cosimo Lupo
99303de5c5
[subset_test] add tests for desubroutinize and no-hinting options using Lobster subset
The following test cases are expected to fail because the current implementation of drop_hints
also strips the charstrings' advance widths:

Tests/subset/subset_test.py::SubsetTest::test_no_hinting_CFF
Tests/subset/subset_test.py::SubsetTest::test_no_hinting_desubroutinize_CFF
2017-01-25 15:31:54 +00:00
Cosimo Lupo
385c6d8f4f
[data/expect_keep_colr.ttx] adjust empty instructions elements in test data 2017-01-24 18:34:55 +00:00
Cosimo Lupo
e8527bcb48
[data/TestCLR-Regular.ttx] revert unnecessary changes from 337dd1d 2017-01-24 16:39:02 +00:00
Cosimo Lupo
7e1f56a645
[data/expect_keep_colr.ttx] adjust expected data in SubsetTest.test_subset_clr 2017-01-24 14:35:55 +00:00
Jens Kutilek
337dd1d94a Fix tests for indentation changes 2017-01-24 13:20:27 +01:00
Cosimo Lupo
3cdc800873
[Tests] rename all 'testdata' folders to simply 'data'
as it's now obvious what kind of data they are
2017-01-17 13:33:46 +00:00