4702 Commits

Author SHA1 Message Date
Simon Cozens
68cbcd10cd
Merge pull request #2027 from simoncozens/mtilib-docs
Document mtiLib library
2020-09-09 15:55:23 +01:00
Simon Cozens
7ca00727a9
Merge pull request #2054 from simoncozens/more-interpolatable-tests
[varLib] Test for interpolatability of paths
2020-09-09 15:55:05 +01:00
Simon Cozens
a2e3e9dce2
Apply suggestions from code review
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2020-09-09 15:28:20 +01:00
Just van Rossum
9064e53c7a
Add registry for custom table packer/unpacker classes (#2055)
* Add custom table packer/unpacker registry

* fix documentation for getTableClass(): it will never return None

* add unregisterCustomTableClass(), mostly for testing
2020-09-09 11:35:06 +02:00
Simon Cozens
1d366fa345 Address feedback 2020-09-03 14:12:49 +01:00
Simon Cozens
bc9c7b6b14 [varLib] Test for interpolatability of paths
* Checks node count of each path
* Checks operation type of each path node
2020-09-03 11:24:58 +01:00
Cosimo Lupo
a41005077d
Bump version: 4.14.0 → 4.14.1.dev0 2020-08-19 11:10:01 +01:00
Cosimo Lupo
ae20a4d777
Release 4.14.0 2020-08-19 11:10:00 +01:00
Khaled Hosny
fe2c31b6f4
Merge pull request #2037 from khaledhosny/fealib-lookupflag-anonclass
[feaLib] Allow anonymous glyphclass in LookupFlags
2020-08-17 17:15:52 +02:00
Just van Rossum
bec19252c5
[ttLib] Fix for #2044: fix maxp.maxComponentDepth calculation (#2045)
Fix for #2044: don't overwrite the initial maxComponentDepth variable, as this will give the wrong value when there are multiple nested components.
2020-08-14 20:13:01 +02:00
Cosimo Lupo
81d0042a9e
varLib.models: fix argument name in main() 2020-08-12 09:41:46 +01:00
justvanrossum
c785c0ea9b fixed typo 2020-08-08 19:59:10 +02:00
Khaled Hosny
7db9ba6ef6 [feaLib] Allow anonymous glyphclass in LookupFlags
Almost everywhere else when a glyph class name is accepted, anonymous
glyph classes are also accepted. This is rather inconsistent and
inconvenient.
2020-08-07 19:57:31 +02:00
Jouni Seppänen
93a5cbd118 Remove import of py23 fron subset/__init__.py
This import is causing an unsightly DeprecationWarning.

I checked manually: the only names being used from py23 are
open, range and zip, which are defined to be the same as the
corresponding Python 3 builtins, so this should cause no
visible change except for suppressing the warning.
2020-08-02 08:04:19 +03:00
Cosimo Lupo
e63ecc5b5e
subset: FeatureVariations may None in GSUB 1.1
Fixes https://github.com/fonttools/fonttools/issues/2023
2020-07-27 16:53:15 +01:00
Simon Cozens
f72983b09d Document mtiLib library 2020-07-22 14:31:17 +01:00
Simon Cozens
85edf0e380 Use the ChainContextualRule class instead of bare tuples 2020-07-22 14:20:50 +01:00
Simon Cozens
b9f2482c42 Add a ChainContextualRule class 2020-07-22 14:20:50 +01:00
Simon Cozens
ae5e000e29 Run black on all these too. 2020-07-15 17:16:12 +01:00
Simon Cozens
8590bcf06d Reformat with black 2020-07-15 17:12:46 +01:00
Simon Cozens
e58fea95ce Reformat with black 2020-07-15 14:14:01 +01:00
Simon Cozens
69a76e9dd8 Reformat with black. 2020-07-15 13:25:33 +01:00
Simon Cozens
cbe6d3a3f4
Merge pull request #2016 from simoncozens/gsub5-gpos7-lookups
Generate GSUB5/GPOS7 lookups (See #1856)
2020-07-11 21:51:47 +01:00
Simon Cozens
c1a885ad55 Missed stylistic fix 2020-07-11 19:58:06 +01:00
Simon Cozens
b6f7b2dc4b Stylistic fixes from feedback 2020-07-11 19:54:52 +01:00
Cosimo Lupo
9856c1e41e
Bump version: 4.13.0 → 4.13.1.dev0 2020-07-10 12:48:00 +01:00
Cosimo Lupo
c30a5fc117
Release 4.13.0 2020-07-10 12:47:59 +01:00
Cosimo Lupo
4594a0c378
Merge pull request #2008 from fonttools/colrv1-rev2
Update COLRv1 impl following proposed changes in the draft spec
2020-07-10 09:57:00 +01:00
Cosimo Lupo
09c0e42031
Partly revert "use 32-bit GlyphIDs in COLRv1 baseGlyphs and layers"
This reverts commit 690080b14d9a4f193092ffc172a39b3e212d307c.

We keep 16-bit GlyphIDs for COLRv1 tables, at least for now
https://github.com/googlefonts/colr-gradients-spec/pull/24

I keep the GlyphID32 converter in case we may need it in the future.
2020-07-08 16:06:45 +01:00
Simon Cozens
8c3dfc4e33 Refactor subtable/lookup record building code
It's a bit gross, but I'm blaming OpenType for that. I'm doing this now because otherwise it would be even more repetitive once we start adding format 1 Rule and Ruleset subtables.
2020-07-07 17:35:16 +01:00
Simon Cozens
bc0f69884e Thinko 2020-07-07 13:28:44 +01:00
Simon Cozens
f04ffe4131 Make non-chaining contextuals where we can. (Fixes #1856) 2020-07-07 13:19:36 +01:00
Simon Cozens
df3e08bb22 Add a function to set coverage for GSUB5/GPOS7 lookups 2020-07-07 13:15:27 +01:00
Simon Cozens
06c270582a Begin to use the new rulesets. Be explicit that we are building Format 3 lookups right now. 2020-07-07 12:48:53 +01:00
Simon Cozens
9f4cc2f1cb Introduce the concept of a ClassContextualRuleSet
Currently unused but will be super helpful for optimizing the formats of contextual lookups.

* Splits the rules of a class contextual lookup based on explicit subtable breaks
* Returns various properties on the ruleset to help determine appropriate layout format.
* (More properties, such as "touched glyphs", planned - will be added when needed.)
2020-07-07 12:44:25 +01:00
Simon Cozens
26072943c3
Merge pull request #2014 from simoncozens/remove-macos-module
Remove MacOS module references. Fixes #1978.
2020-07-07 09:36:42 +01:00
Simon Cozens
18a978bd3d Remove MacOS module references. Fixes #1978. 2020-07-07 09:08:10 +01:00
Simon Cozens
8370849678 Fix documentation for MultipleSubstStatement (fixes #2012) 2020-07-07 08:41:06 +01:00
Cosimo Lupo
64731aedd0
Merge remote-tracking branch 'origin/master' into colrv1-rev2 2020-07-03 12:58:57 +01:00
Simon Cozens
73631c9642
otlLib documentation (#2009)
Document otlLib

Includes other minor changes:

* When a markFilterSet parameter is passed to a builder, LOOKUP_FLAG_USE_MARK_FILTERING_SET will be added to the lookup's flags.
* The unused arguments valueformat1 and valueformat2 were removed from ClassPairPosSubtableBuilder.
2020-07-03 12:52:50 +01:00
Simon Cozens
1ed5916a8a Fix *all* docs about markFilterSet, not just the first one... 2020-07-03 12:50:57 +01:00
Simon Cozens
ece76d36e2 Unnecessary comments 2020-07-03 12:39:21 +01:00
Simon Cozens
f54528a70b Remove unused arguments to ClassPairPosSubtableBuilder 2020-07-03 12:39:11 +01:00
Simon Cozens
8e0b1fbfe2 Allow location to be optional. 2020-07-03 12:35:55 +01:00
Simon Cozens
c43b58c973 Force mark filtering flag set. 2020-07-03 12:35:43 +01:00
Simon Cozens
db8948b654 Document otlLib.builder, high-level lookup builders.
Essentially the documentation from #1995, incorporates @dscorbett
feedback.
2020-07-03 11:38:29 +01:00
Cosimo Lupo
560561846b
Merge pull request #2002 from fonttools/use_case-insensitive_filenames
make sure a list of possible case-insensitive file names is send
2020-07-03 11:35:56 +01:00
Simon Cozens
6364d36633
[otlLib] Refactor chained contextual builders (#2007)
* Introduce a new subclass for chained contextual (sub and pos)

* Rename .substitutions to .rules in subst builders to allow for code reuse

* Make format of subtable break marker tuple common between sub/pos

Note that prior to this patch, add_subtable_break in a Subst builder adds:

(self.SUBTABLE_BREAK_, self.SUBTABLE_BREAK_, self.SUBTABLE_BREAK_, self.SUBTABLE_BREAK_)

while add_subtable_break in a Pos builder adds:

(self.SUBTABLE_BREAK_, self.SUBTABLE_BREAK_, self.SUBTABLE_BREAK_, [self.SUBTABLE_BREAK_])

This is messy. If we read the first element from the tuple instead of the last one to test if a rule is a subtable break, we can make the marker tuple the same.

* And now the subtable break code can be hoisted into superclass

* These helper methods will make the build routine common

* Hoist common build method to superclass

The diff doesn’t show it very clearly because it’s being too clever, but all I’ve done is moved one method. Everything works apart from the error message, which comes next.

* Fix the error message
2020-07-02 18:40:20 +01:00
Cosimo Lupo
070e9a7c7d
Merge remote-tracking branch 'origin/master' into colrv1-rev2 2020-07-02 14:41:43 +01:00
Simon Cozens
ebfa4ba1fe
Move feature builders to otlLib
Refactors feaLib, moving code which builds OpenType lookups into otlLib. Note that this changes feaLib's concept of `location` from a tuple to an object.
2020-07-02 14:09:10 +01:00