Just van Rossum
2f79fbc951
remove GDEF warning completely, as per discussion in #2694
2022-08-16 14:08:46 +02:00
Just van Rossum
10c92ba338
Fix for #2694 : only warn about not-requested-GDEF if building a VF AND GPOS is requested but GDEF isn't
2022-08-15 21:20:13 +02:00
Just van Rossum
e4c5c842f1
Allow features to be added to VF without building GDEF; warn when GDEF would be needed but isn't requested. This fixes #2694
2022-07-20 11:28:29 +02:00
Just van Rossum
6c6245e382
Add missing required argument. Fixes #2692
2022-07-12 13:52:17 -06:00
David Corbett
8ec37c4bb3
[feaLib] Let the parser set nameIDs 1 through 6
2022-07-02 15:23:03 -04:00
Behdad Esfahbod
97958a95e1
Merge pull request #2662 from fonttools/varstore-empty
...
[varLib.varStore] Support NO_VARIATION_INDEX
2022-06-23 12:02:00 -06:00
Simon Cozens
d224e1f73d
[feaLib] show all missing glyphs at once ( #2665 )
2022-06-23 15:04:59 +01: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
Thomas Rettig
892322aaff
Fix grammar ( #2487 )
2022-01-04 11:44:04 +01:00
Simon Cozens
ed07df39da
Die noisily ( #2472 )
2021-12-14 19:26:50 +00:00
Simon Cozens
af9dfc94e7
Forbid empty classes (take 2) ( #2446 )
2021-11-18 11:31:49 +00:00
Simon Cozens
563730f8ce
Support variable feature syntax ( #2432 )
2021-10-28 11:58:54 +01:00
Khaled Hosny
232b2ccbc4
Move the rest of py23 module to textTools
...
Change all imports to use textTools module, except the test_py23.py test
which is kept until we decide to remove the module (if ever).
2021-08-20 01:29:45 +02:00
justvanrossum
3e0a6542c0
Use r-string instead of escaping backslash
2021-05-20 13:44:38 +02:00
justvanrossum
f99f1bbc36
fixed two instances of 'DeprecationWarning: invalid escape sequence'
2021-05-19 14:20:57 +02:00
Khaled Hosny
f6d2ff8d2a
[feaLib] Allow substituting a glyph class with NULL
...
sub [a b c] by NULL; was producing errors, now it builds as multiple
statements.
2021-05-12 08:53:26 +02:00
Just van Rossum
9825ab0977
Fix for #2293 : allow more than one lookahead glyph/class in contextual positioning with "value at end" ( #2294 )
...
* add test that fails for #2293
* fixing #2293 : rewrite of contextual positioning logic, ensure len(suffix) > 1 yields the correct result; checking more edge cases and raising errors inspired by makeotf
* test error cases
* only check when we actually have a value
* catch one more case that makeotf errors on and we didn't
2021-05-08 09:22:30 +02:00
Cosimo Lupo
9b5bc9e18b
feaLib: ignore empty named lookup reference
...
Fixes #2276
2021-04-22 13:11:57 +01:00
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Behdad Esfahbod
d0aaf1bceb
[feaLib] Set RangeStart/RangeEnd as float
...
Fixes the one failing test after previous commit.
2021-03-24 08:04:14 -07:00
Cosimo Lupo
9aeb48286d
black
2021-02-25 17:16:02 +00:00
Kamile Demir
29ff42d15f
Reusing otlLib buildStatTable() in feaLib
2021-02-25 17:16:02 +00:00
Zachary Scheuren
0434b1a917
Add feaLib support for STAT table
2021-02-25 17:16:01 +00:00
Denis Moyogo Jacquerye
2563b1df7e
[feaLib] black ast.py
2021-02-18 19:19:18 +00:00
Denis Moyogo Jacquerye
e47101d683
[feaLib] indent anchor statements
2021-02-18 17:14:57 +00:00
Simon Cozens
56df97b5f2
Prohibit non-functional "sub A B by NULL"
2021-02-03 14:16:57 +00:00
Simon Cozens
d1e85cb888
Allow 'sub X by NULL;' sequence to delete a glyph
2021-02-03 14:12:46 +00:00
Simon Cozens
f827a2a7f1
Turn on feaLib debugging from the environment
...
export FONTTOOLS_LOOKUP_DEBUGGING=1 to make a Debg table
2020-11-19 11:48:54 +00:00
Simon Cozens
0c9cb3a878
Warn developer if subclass needs upgrading
2020-10-18 11:21:49 +01:00
Simon Cozens
8ed7792682
Only stash lookup location if buildLookups_ has cooperated
...
Fixes #2065
2020-09-23 10:10:38 +01:00
Simon Cozens
2ef66ea4ca
Debugging should not be the default (oops)
2020-09-11 09:44:28 +01:00
Simon Cozens
7135255d4a
Style nits
2020-09-11 09:35:45 +01:00
Simon Cozens
95a941ec15
Re-case debug info module
2020-09-11 09:31:07 +01:00
Simon Cozens
af4f1f6d6e
Prefer module constant to hard-coded string for Debg table key
2020-09-10 16:00:06 +01:00
Simon Cozens
87c65acd3a
JSON ends up stringifying number keys, so do that now in case we’re round-tripping without writing the file out.
2020-09-10 08:29:41 +01:00
Simon Cozens
8869e0dec7
Add debug flag to feaLib command line utility
2020-09-09 20:18:03 +01:00
Simon Cozens
b680eaf782
Add debug arg to addOpenTypeFeatures
2020-09-09 20:15:50 +01:00
Simon Cozens
41c1dcce1c
Tidy up as per review
2020-09-09 19:56:44 +01:00
Simon Cozens
4cddc38263
Use a named tuple, tidy ttx dump code
2020-09-09 19:56:05 +01:00
Simon Cozens
b548c5f2e1
Namespace debug output.
2020-08-25 20:22:54 +01:00
Simon Cozens
e2433bd22a
Make Debg table optional
2020-08-25 20:22:16 +01:00
Simon Cozens
2e112a464a
Dump feature locations into Debg
2020-08-25 20:19:26 +01: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
Simon Cozens
85edf0e380
Use the ChainContextualRule class instead of bare tuples
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
8370849678
Fix documentation for MultipleSubstStatement ( fixes #2012 )
2020-07-07 08:41:06 +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
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