9870 Commits

Author SHA1 Message Date
Simon Cozens
d224e1f73d
[feaLib] show all missing glyphs at once (#2665) 2022-06-23 15:04:59 +01:00
Cosimo Lupo
b4d85f23cf
Merge pull request #2663 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-06-23 11:19:38 +01:00
nathannaveen
83f69028a3 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
2022-06-23 00:58:26 +00:00
Behdad Esfahbod
e917c43ca9 [varLib.varStore] Add operator __bool__ and use it
Part of https://github.com/fonttools/fonttools/issues/2211#issuecomment-790125437
2022-06-21 14:03:20 -06:00
Cosimo Lupo
9c0bc3814f varLib: add --no-colr-layer-reuse option to disable rebuilding LayerList 2022-06-21 17:27:12 +01:00
Cosimo Lupo
00959d3132 varLib: build variable COLR table when master fonts contain COLRv1 2022-06-21 17:27:12 +01:00
Cosimo Lupo
e58c43d187 varLib.merger: add a COLRVariationMerger to merge multiple master COLRv1 into a variable COLR 2022-06-21 17:27:12 +01:00
Cosimo Lupo
24941e613f otTraverse: add module containing methods for traversing trees of otData tables
this is adapted from nanoemoji's
d65a627154/src/nanoemoji/util.py (L122-L162)
2022-06-21 17:27:12 +01:00
Cosimo Lupo
fae63959a9 otTables: add class attributes to link Var{Table} <-> {Table}
so one can go from Affine2x3 <-> VarAffine2x3 and similar types that have an associated Var{Type}
2022-06-21 17:27:12 +01:00
Cosimo Lupo
ca2f9e0a94 otBase: use OptionalValue.DEFAULT in populateDefaults() 2022-06-21 17:27:12 +01:00
Cosimo Lupo
bc8f1cfac4 varLib.errors: more informative message with unsupported/inconsistent formats 2022-06-21 17:27:12 +01:00
Cosimo Lupo
fa54b0fd62 otTables: add methods to Format enums to query the variable variants 2022-06-21 17:27:12 +01:00
Cosimo Lupo
97bcda9d35 otBase: define method to get variable attrs with associated VarIndexBase + {offset} 2022-06-21 17:27:11 +01:00
Cosimo Lupo
396353e8e3 otConverters: parse 'VarIndexBase + {offset}' from converters' description 2022-06-21 17:27:11 +01:00
Cosimo Lupo
871ee3d527 otData: add 'VarIndexBase + {offset}' to description of all COLR variable fields 2022-06-21 17:27:11 +01:00
Cosimo Lupo
82460bd368 otConverters: define a base class for all fixed-size floats with toInt/fromInt methods
this will be useful when computing deltas for COLR table fields that use Fixed or F2Dot14 (ItemVariationStore internally treats fixed-value floats as 16 or 32-bit integers)
2022-06-21 17:27:11 +01:00
Cosimo Lupo
676a66fad3 otTables: make DeltaSetIndexMap TTX dump less verbose by omitting no-op entries
though we still emit the empty <Map index=.../> elements; they help identify chunks of delta-set indices, and define the length of the array upon loading from XML
2022-06-21 17:27:11 +01:00
Cosimo Lupo
0cbdc8536b [otBase/varLib.merger] don't recurse in ensureDecompiled, merger is already working recursively 2022-06-21 17:27:11 +01:00
Cosimo Lupo
c612b2637f colorLib.unbuilder: ensure unbuildColrV1 flattens nested PaintColrLayers 2022-06-21 17:27:11 +01:00
Cosimo Lupo
fc982c643b colorLib: add option to disable PaintColrLayers' reuse of layers from LayerList
When building COLR masters, layer reuse may lead to different number of layers between masters, becasue some master may reuse specific layers while others may not. Add a flag to disable this optimization; will need to be run again after the VF COLR font has been merged
2022-06-21 17:27:11 +01:00
Behdad Esfahbod
0d7d7d4e11 [varLib.iup] Rewrite force-set conditions & limit DP lookback length
This does two things:

Fixes forced-set computation, which was wrong in multiple ways.
Debugged it. Is solid now... Famous last words.

Speeds up DP time by limiting DP lookback length. For Noto Sans,
IUP time drops from 23s down to 9s, with only a slight size increase
in the final font. This basically turns the algorithm from O(n^3) into
O(n).
2022-06-20 17:09:36 -06:00
Jens Kutilek
d0020b2536
Add check for missing glyphs to featureVars (#2654)
* Add check for missing glyphs to featureVars
2022-06-17 15:24:54 +02:00
Cosimo Lupo
2aafbb5073
Merge pull request #2656 from fonttools/varlib-undefined-exception
[varLib.merger/errors] fix undefined exception name
2022-06-17 12:22:49 +01:00
Cosimo Lupo
c34ff0d474 [varLib.merger/errors] fix undefined exception name
The exception UnsupportedFormat was defined and then redefined with the same name in varLib.errors, and imported twice from varLib.merger, probably as result of a sweeping find/replace.
Rename it 'InconsistentFormats' as originally intended.
2022-06-17 11:24:56 +01:00
Cosimo Lupo
95c98f990f
Merge pull request #2649 from googlefonts/recalc_timestamps
Add flag to mutator/instancer to allow recalc timestamp to be disabled.
2022-06-14 15:24:27 +01:00
Cosimo Lupo
d6b5ce7669 [varLib.instancer] add --no-recalc-timestamp option
same as varLib.mutator
2022-06-14 15:16:12 +01:00
Cosimo Lupo
7b3a8d3d2c [mutator] rename --no-recalc-timestamp, like in pyftsusbet; simplify option parsing 2022-06-14 15:11:47 +01:00
Garret Rieger
b2c00d7883 Add flag to mutator to allow recalc timestamp to be disabled. 2022-06-13 22:03:32 +00:00
Cosimo Lupo
4fff281c7e varLib_test: fix expected error message 2022-06-13 12:19:38 +01:00
Cosimo Lupo
8d992508a4 varLib.errors: fix confusing error message when FeatureCount is different
see https://github.com/googlefonts/fontmake/issues/894
2022-06-13 12:14:25 +01:00
Cosimo Lupo
513b7d9a36 varLib.errors: use getBestFullName to print name of master ttf 2022-06-13 12:08:40 +01:00
Cosimo Lupo
69c131a1c2
Merge pull request #2642 from fonttools/pyup-scheduled-update-2022-06-06
Scheduled weekly dependency update for week 23
2022-06-10 16:27:33 +01:00
Cosimo Lupo
3ceabeda7c
Merge pull request #2645 from fonttools/svg_compression
Clean up svgDoc compression #2
2022-06-10 15:53:47 +01:00
Jany Belluz
f19aa60e65
Merge pull request #2634 from fonttools/ds-avoid-isinstance
[designspaceLib] Check for descriptor types with hasattr()
2022-06-09 17:50:47 +01:00
Jany Belluz
99a2ad010d
Merge pull request #2640 from fonttools/ds-add-to-all
[designspaceLib] Add new classes to __all__
2022-06-09 17:50:22 +01:00
Cosimo Lupo
63ce9ea3e8 requirements.txt: scipy 1.8 now requires py38 2022-06-09 17:26:55 +01:00
Cosimo Lupo
119b7732cc SVG: strip timestamp to make compressed gzip reproducible
we tell GzipFile to write the MTIME field to zero so that the compressed output is reproducible and doesn't change depending on when the data is compressed.
2022-06-09 16:29:29 +01:00
Cosimo Lupo
8673073a87 S_V_G__test: test compiling/decompiling compressed doc 2022-06-09 15:27:57 +01:00
Cosimo Lupo
be623e257f Clean up svgDoc compression
This is based on bungeman's https://github.com/fonttools/fonttools/pull/2627

Previously, an entire `SVG ` table would be marked as compressed if any
of the decoded SVG documents in it were compressed. Then on encoding all
SVG documents would be considered for compression. The XML format had no
means to indicate if compression was desired.

Instead, mark each svgDoc with its compression status. When decoding
mark the svgDoc as compressed if the data was compressed. When encoding
try to compress the svgDoc if it is marked as compressed. In the XML
format the data itself is always uncompressed, but allow an optional
`compressed` boolean attribute (defaults to false) to indicate the
svgDoc should be compressed when encoded.

We also try to make sure that older code that relies on docList containing
sequences of three items (doc, startGID, endGID) will continue to work
without modification.
2022-06-09 15:15:05 +01:00
Cosimo Lupo
a367e8acf5
Merge pull request #2626 from googlefonts/table_sharing
Enable sharing across subtables of extension for harfbuzz packing.
2022-06-09 11:02:29 +01:00
Jany Belluz
737abf5020
[designspaceLib] Add DiscreteAxisDescriptor default in docstring 2022-06-08 10:03:04 +01:00
pyup-bot
a067d906d8 Update uharfbuzz from 0.24.1 to 0.26.0 2022-06-06 17:09:07 +01:00
pyup-bot
859cdbd9b3 Update pyobjc from 8.1 to 8.5 2022-06-06 17:09:07 +01:00
pyup-bot
02478819cf Update ufolib2 from 0.13.0 to 0.13.1 2022-06-06 17:09:06 +01:00
pyup-bot
a3b647f276 Update fs from 2.4.14 to 2.4.16 2022-06-06 17:09:06 +01:00
pyup-bot
16b48bb1a6 Update zopfli from 0.1.9 to 0.2.1 2022-06-06 17:09:06 +01:00
pyup-bot
b93d3490c8 Update scipy from 1.7.3 to 1.8.1 2022-06-06 17:09:05 +01:00
pyup-bot
253c2dbde5 Update freetype-py from 2.2.0 to 2.3.0 2022-06-06 17:09:05 +01:00
pyup-bot
b8cd73e590 Update freetype-py from 2.2.0 to 2.3.0 2022-06-06 17:09:05 +01:00
pyup-bot
3eda4b1041 Update reportlab from 3.6.5 to 3.6.10 2022-06-06 17:09:04 +01:00