43 Commits

Author SHA1 Message Date
Cosimo Lupo
0e3c6eeaec
builder_test: test ClassDef sets with same length, to check deterministic sorting between python 2/3
See issue #766
2016-12-30 15:40:58 +00:00
Behdad Esfahbod
3eacc23868 Update tests for previous commit
The following sed command can be used to update TTX sources for the LookupType
change:

$ sed -i'~' 's/<!-- LookupType=\(.\) -->/<LookupType value="\1"\/>/g' *.ttx
2016-12-28 20:29:43 -05:00
Cosimo Lupo
689d0c3fe4
set maxDiff=None attribute only once, using setUpClass method of unittest.TestCase 2016-12-21 13:57:44 +00:00
Cosimo Lupo
f112a05be2
adjust unit tests to expect a list of strings from getXML() 2016-12-21 13:57:44 +00:00
moyogo
f81e1411b3 [otlLib] glyph class as list and tuple instead of set and frozenset 2016-04-25 22:37:34 +01:00
Sascha Brawer
c64019b3c6 [otlLib] Move building of class-based PairPos sutables from feaLib to otlLib 2016-02-02 15:17:01 +01:00
Sascha Brawer
f9e859c213 [otlLib] Move helper for building ClassDef tables from feaLib to otlLib 2016-02-02 10:48:47 +01:00
Sascha Brawer
0f609592bb [otlLib] Build multiple glyph-based PairPos subtables when needed
Before this change, feaLib would group glyph-based pair positionings
by value formats. After this change, this logic happens in otlLib.
But clients can still do their own grouping if they wish, by calling
the buildPairPosGlyphsSubtable() method directly.
2016-02-02 10:30:33 +01:00
Sascha Brawer
5095aa9ecf [otlLib] Move building of glyph-based PairPos subtables from feaLib to otlLib 2016-02-02 09:35:31 +01:00
Behdad Esfahbod
521d1d0e90 [otlLib] Remove duplicate points in buildAttachPoint() 2016-01-22 19:56:10 +01:00
Behdad Esfahbod
33eb68e21a [otlLib] Disallow negative pixel-size in buildDevice()
These fields are USHORT.
2016-01-22 19:49:22 +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
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
a4318a38c1 [otlLib] Build MarkRecords 2016-01-21 11:29:32 +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
35cc4b886d [otlLib] Minor: Use variable names that are less confusing 2016-01-19 16:54:52 +01:00
Sascha Brawer
ed4c93514c [otlLib] Test what otlLib.buildSinglePos() does with empty values
Context: https://github.com/behdad/fonttools/issues/471

This test helps to isolate the problem. Now we know that it is
in feaLib while otlLib behaves correctly.
2016-01-19 16:49:54 +01:00
Sascha Brawer
ce7cc432f2 [otlLib] Implement otlLib.getSinglePosSubtable()
https://github.com/behdad/fonttools/issues/468
2016-01-19 15:40:19 +01:00
Sascha Brawer
6c7776683e [otlLib] Implement buildSinglePos() 2016-01-19 14:22:28 +01:00
Sascha Brawer
049fd4bd8f [otlLib] Move CursivePos building from feaLib to otlLib 2016-01-14 17:54:47 +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
Behdad Esfahbod
79953e9912 [otlLib] Fix build 2016-01-14 12:32:32 +00:00
Sascha Brawer
18297eb591 [otlLib] Move buildAnchor from feaLib to otlLib 2016-01-14 13:08:26 +01:00
Sascha Brawer
0c001da24a [otlLib] Add tests for buildDevice() 2016-01-14 12:24:37 +01: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