Sascha Brawer
4ee17824e1
[feaLib] Use global scope for glyph classes; allow re-definitions
...
Resolves https://github.com/behdad/fonttools/issues/496
2016-02-01 18:29:41 +01:00
Sascha Brawer
befce507a8
[feaLib] Use global scope for lookup names
...
Resolves https://github.com/behdad/fonttools/issues/461
2016-02-01 14:39:32 +01:00
Cosimo Lupo
c4d2ebca66
remove deprecated use of 'quiet' option in test modules
2016-02-01 13:39:39 +00:00
Cosimo Lupo
ac56990aad
replace all uses of codecs.open with py23.open
2016-01-26 15:45:27 +00:00
Sascha Brawer
ab8f9ee785
[feaLib] Add test case for bug 463
...
https://github.com/behdad/fonttools/issues/463
2016-01-26 12:45:56 +01:00
Sascha Brawer
6dcddd9e36
[feaLib] Compile test files to binary tables in addition to XML
...
https://github.com/behdad/fonttools/issues/463
2016-01-26 12:39:41 +01:00
Sascha Brawer
b2e663a1fc
[feaLib] Compile lookups after assigning lookup indices
...
Before this change, feaLib had assigned a lookup index at the same
time as compiling each lookup. For chains, the implicit assumption was
that the chain's targets would always come before the contexual chain.
Normally this was indeed the case, but feaLib (and also makeotf)
sometimes merge several chain targets into one single lookup,
and then this assumption was not true anymore.
In the new version, the lookups get compiled in a separate pass,
after assigning lookup indices.
https://github.com/behdad/fonttools/issues/463
2016-01-26 12:09:52 +01:00
Sascha Brawer
f5af1cf682
[feaLib] Minor: Remove obsolete import statement
2016-01-25 19:46:02 +01:00
Sascha Brawer
c09e8862c0
[feaLib] Handle contextual chained SinglePos rules
...
Resolves https://github.com/behdad/fonttools/issues/485 .
2016-01-25 16:27:18 +01:00
Sascha Brawer
a7c0b5c78f
[feaLib] Implement chained contextual single positioning
...
https://github.com/behdad/fonttools/issues/485
2016-01-25 15:10:40 +01:00
Sascha Brawer
312136356a
[feaLib] Raise FeatureLibError for not-yet-implemented construct
2016-01-25 12:26:23 +01:00
Sascha Brawer
82a444d659
[feaLib] Parse glyph patterns with multiple values
...
For example, we now recognize `pos one' 1 two' 2 three' 3;`
as a SinglePos statement, like makeotf does.
https://github.com/behdad/fonttools/issues/485
2016-01-25 12:18:17 +01:00
Behdad Esfahbod
58b49a1a42
[otlLib] change buildDevice API to take dict
...
Makes more sense. feaLib can be simplified by storing a dict
as well, but for now just cast.
2016-01-22 19:45:56 +01:00
Behdad Esfahbod
4e13a2268e
[otlLib] One more rename
2016-01-22 19:38:20 +01:00
Behdad Esfahbod
aea0ce9ae1
[otlLib] Adapt names to newly agreed scheme
2016-01-22 19:32:45 +01:00
Sascha Brawer
af48e43371
[otlLib] Move building of MarkLigPos from feaLib to otlLib
2016-01-22 14:50:17 +01:00
Sascha Brawer
036e2ce497
[otlLib] Move building of LigatureArrays from feaLib to otlLib
...
Not sure if empty ComponentRecords can be optimized away.
For the time being, leaving the output unchanged so that
the refactoring has no effect on the generated files.
2016-01-22 14:14:47 +01:00
Sascha Brawer
1978194caf
[otlLib] Move building of LigatureAttach tables from feaLib to otlLib
2016-01-22 12:45:29 +01:00
Sascha Brawer
cf7c670e80
[otlLib] Move building of MarkBasePos from feaLib to otlLib
2016-01-22 11:53:34 +01:00
Sascha Brawer
50cbd5ca78
[otlLib] Move building of BaseArrays from feaLib to otlLib
2016-01-22 10:57:03 +01:00
James Godfrey-Kittle
34115b2f3f
[feaLib] Add unit test for empty statement parsing
2016-01-21 13:32:58 -08:00
James Godfrey-Kittle
8fa5073e7e
[feaLib] Accept empty statements in parser
2016-01-21 10:32:30 -08:00
Sascha Brawer
de24f4f0d4
[otlLib] Move building of BaseRecords from feaLib to otlLib
2016-01-21 17:23:36 +01:00
Sascha Brawer
08fa0f14dd
[otlLib] Move building of MarkArrays from feaLib to otlLib
2016-01-21 16:23:55 +01:00
Sascha Brawer
f42d312580
[otlLib] Move building of ComponentRecords from feaLib to otlLib
2016-01-21 15:16:55 +01:00
Sascha Brawer
15ca8bb0a0
[otlLib] Move building of Mark2Records from feaLib to otlLib
2016-01-21 13:08:16 +01:00
Sascha Brawer
b07d168c0e
[feaLib] Simplify how MarkArrays are built
2016-01-21 11:39:34 +01:00
Sascha Brawer
3c65e82307
[otlLib] Move building of otTables.Lookup from feaLib to otlLib
2016-01-20 19:25:41 +01:00
Sascha Brawer
51ec0bf5cc
[otlLib] Move building of MarkGlyphSetsDef table from feaLib to otlLib
2016-01-20 11:28:33 +01:00
Sascha Brawer
3eacada029
[otlLib] Move building of LigCaretLists from feaLib to otlLib
2016-01-20 09:49:09 +01:00
Sascha Brawer
939b03fbea
[otlLib] Move building of LigGlyphs from feaLib to otlLib
2016-01-20 09:16:31 +01:00
Sascha Brawer
bfff7b4e86
[otlLib] Move building of CaretValues from feaLib to otlLib
2016-01-20 08:23:42 +01:00
Sascha Brawer
1bb757ee3c
[otlLib] Return None for empty argument to buildAttachList()
...
This simplifies call sites when building GDEF tables.
Also, publicly expose the buildAttachPoint() function.
https://github.com/behdad/fonttools/issues/468#issuecomment-173006650
2016-01-19 23:25:47 +01:00
Sascha Brawer
d1fd788af9
[otlLib] Build AttachLists in otlLib instead of feaLib
2016-01-19 22:38:23 +01:00
Sascha Brawer
f9f951d2ae
[otlLib] Do not emit empty <Value/> elements for empty ValueRecords
...
No changes in the compiled binary representation, this just affects XML.
After this change, the XML for empty ValueRecords is identical to the
output from makeotf.
https://github.com/behdad/fonttools/issues/471
2016-01-19 22:01:30 +01:00
Sascha Brawer
d39f22668e
[feaLib] Emit ValueRecords even if their ValueFormat is zero
...
https://github.com/behdad/fonttools/issues/471
2016-01-19 17:07:08 +01:00
Sascha Brawer
32a6754fd7
[feaLib] Use otlLib for generating SinglePos tables
...
See https://github.com/behdad/fonttools/issues/471 for the change
to ValueRecords whose ValueFormat is zero; this may indicate a problem
in otlLib that needs to be fixed.
Resolves https://github.com/behdad/fonttools/issues/472 .
2016-01-19 16:27:45 +01:00
Sascha Brawer
049fd4bd8f
[otlLib] Move CursivePos building from feaLib to otlLib
2016-01-14 17:54:47 +01:00
Sascha Brawer
3968aaa71b
[feaLib] Make invocation of otlLib less verbose
2016-01-14 17:15:52 +01:00
Sascha Brawer
9612ef1a22
[otlLib] Move buildCoverage from feaLib to otlLib
2016-01-14 17:10:45 +01:00
Sascha Brawer
0f8882bcc3
[otlLib] Move creation of ValueRecords from feaLib to otlLib
2016-01-14 16:27:04 +01:00
Sascha Brawer
18297eb591
[otlLib] Move buildAnchor from feaLib to otlLib
2016-01-14 13:08:26 +01:00
Sascha Brawer
d2f9fa8a39
[feaLib] Simplify how ClassDef tables are built
...
In f0eb7e98ca0642f17ac82433db8c957fffd6a9d3, the various subclasses
of otTables.ClassDef were merged into one single class. Therefore,
we can now always instantiate otTables.ClassDef() which is simpler.
2016-01-14 11:56:57 +01:00
Sascha Brawer
bf29ec9555
[otlLib] Move the building of Device tables from feaLib to otlLib
2016-01-14 11:48:17 +01:00
Sascha Brawer
78092ba783
[feaLib] Do not set otTables.AlternateSubst.Format
2016-01-14 11:30:46 +01:00
Sascha Brawer
e60b939088
[feaLib] Simplify how coverage tables are built
...
In f0eb7e98ca0642f17ac82433db8c957fffd6a9d3, the various subclasses
of otTables.Coverage were merged into one single class. Therefore,
we can now always instantiate otTables.Coverage() which is simpler.
2016-01-14 11:17:56 +01:00
Sascha Brawer
1bffd6b872
[feaLib] Do not set LigatureSubst.Format
2016-01-14 11:06:11 +01:00
Cosimo Lupo
3dec54f24a
builder_test: move BuilderTest's dynamic method setting out of "__main__" for py.test
2016-01-14 09:43:42 +00:00
Sascha Brawer
6246c71a07
[feaLib] Port to otlLib builder for supported lookups
...
Make the output of otlLib.buildLigatureSubst() deterministic.
Before this change, otlLib ligatures were emitted in a non-deterministic
sorting order (depending on what hash value Python would give
to a string tuple).
2016-01-14 10:27:54 +01:00
Sascha Brawer
0171515246
[feaLib] Fix for b4919b6c0a5ea0ca6747fe7699554e8a14d1f77f
...
After b4919b6c0a5ea0ca6747fe7699554e8a14d1f77f, the tests were
named correctly but they always used the exact same feature file,
irrespective of what file they were supposed to test.
Resolves https://github.com/behdad/fonttools/issues/465
2016-01-14 09:22:24 +01:00