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
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
ce7cc432f2
[otlLib] Implement otlLib.getSinglePosSubtable()
...
https://github.com/behdad/fonttools/issues/468
2016-01-19 15:40:19 +01:00
Cosimo Lupo
6ea91c9e7a
Merge pull request #470 from anthrotype/namerecord-tostr
...
_n_a_m_e: add toStr method to NameRecord
2016-01-19 13:30:54 +00:00
Sascha Brawer
6c7776683e
[otlLib] Implement buildSinglePos()
2016-01-19 14:22:28 +01:00
Cosimo Lupo
be489d07a6
_n_a_m_e: make NameRecord.__str__ call toStr with errors='backslashreplace'
...
the Python docs say that the return value of `__str__` must be a "string" object -- which means bytes in Python 2 and unicode in Python 3. Previously, str(namerecord) would always call 'toUnicode' method, even on Python 2.
https://docs.python.org/2/reference/datamodel.html#object.__str__
https://docs.python.org/3/reference/datamodel.html#object.__str__
2016-01-19 13:20:36 +00:00
Cosimo Lupo
818dd6ce1e
_n_a_m_e: add toStr method to NameRecord
...
as discussed in https://github.com/typesupply/compositor/pull/10
2016-01-19 12:31:46 +00:00
Behdad Esfahbod
ba90369af9
[mtiLib] Port CursivePos to otlLib.builder
2016-01-18 12:32:07 +01:00
Behdad Esfahbod
305b8eaae3
[otlLib] Minor
2016-01-18 12:32:01 +01:00
Behdad Esfahbod
1ddfcee5a1
Minor simplification
2016-01-15 22:25:49 +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
Cosimo Lupo
5856bf90d2
Merge pull request #362 from anthrotype/unicodedata2
...
[unicode] attempt to import `unicodedata2` backport module
2016-01-14 15:17:57 +00:00
Cosimo Lupo
a99b588a4f
Merge pull request #451 from anthrotype/bounds-pen
...
add "ignoreSinglePoints" argument to bounds pen
2016-01-14 15:14:40 +00:00
Behdad Esfahbod
65dafa3c01
[otlLib] Fix badaf94691cd16ae5b801896d2c56a044d88c3d4
...
Ugh.
2016-01-14 15:06:59 +00:00
Behdad Esfahbod
badaf94691
[otlLib] Sanity-check buildAnchor() input
2016-01-14 14:59:10 +00:00
Behdad Esfahbod
8a17e925bf
Revert "[ot] Deprecate, and add properties for, count values"
...
This reverts commit d8803873f6d4efbcb227867fe0ac6bca370597bc.
The commit wasn't fully correct as it was not installing properties
for counts in format-switching subtables.
2016-01-14 12:55:42 +00:00
Behdad Esfahbod
d8803873f6
[ot] Deprecate, and add properties for, count values
...
Part of fixing https://github.com/behdad/fonttools/issues/447
Our own modules still set the counts. Will fix in subsequent
commits.
2016-01-14 12:33:09 +00:00
Behdad Esfahbod
79953e9912
[otlLib] Fix build
2016-01-14 12:32:32 +00:00
Behdad Esfahbod
d7ca50a624
Minor
2016-01-14 12:28:32 +00:00
Behdad Esfahbod
5ea2acad56
[otlLib] "Hide" internal function
2016-01-14 12:27:39 +00:00
Behdad Esfahbod
9727318680
[mtiLib] Writing to XML works after e0d27461bea131518733b4f05ef3068d5a6ecc91
2016-01-14 12:10:38 +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
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
Behdad Esfahbod
6851f66d18
[ot] Instead of deleting unnecessary Format, set it to None
...
Fixes https://github.com/typesupply/compositor/issues/7
2016-01-14 10:47:48 +00: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
Sascha Brawer
b4919b6c0a
[feaLib] Check each test feature file in a separate unit test
...
Resolves https://github.com/behdad/fonttools/issues/465
2016-01-14 08:37:37 +01:00
Behdad Esfahbod
e0d27461be
[XML] Assume None where an attribute is missing
...
This is what the compile() does, so do the same in toXML(), such that
we can save to XML whatever can be saved to binary. Eg. saving what
we read through XML!
Fixes https://github.com/behdad/fonttools/issues/298
Also relevant to https://github.com/behdad/fonttools/issues/447
2016-01-13 19:05:45 +00:00
Behdad Esfahbod
aeb5ecbfd4
[mtiLib] Port to otlLib.builder for supported lookups
2016-01-13 17:54:42 +00:00
Behdad Esfahbod
5c34acb94d
Add otlLib, which is library to work with OpenType Layout tables
...
Contains the sketch and start of a stateless GSUB/GPOS/GDEF builder.
Will be used by mtiLib, feaLib, and the future voltLib. Can also
be used by clients to build these tables with much less pain.
2016-01-13 17:52:30 +00:00
Behdad Esfahbod
14eb194644
[mtiLib] Don't set LookupType
...
Not needed. That comes from the class.
2016-01-13 17:42:56 +00:00
Behdad Esfahbod
c3cb356e7f
[feaLib] Fix for f0eb7e98ca0642f17ac82433db8c957fffd6a9d3
...
ClassDef1 and ClassDef2 are now same type, so can't differentiate
based on that anymore.
2016-01-13 17:29:42 +00:00
Behdad Esfahbod
d992180f1a
[otTables] Fix device names after f0eb7e98ca0642f17ac82433db8c957fffd6a9d3
2016-01-13 17:19:29 +00:00
Behdad Esfahbod
02b0169a8a
[merge] Fix for f0eb7e98ca0642f17ac82433db8c957fffd6a9d3
2016-01-13 17:03:31 +00:00
Behdad Esfahbod
0ec2911c47
[subset] Fix for f0eb7e98ca0642f17ac82433db8c957fffd6a9d3
2016-01-13 17:00:29 +00:00
Behdad Esfahbod
f0eb7e98ca
[otTables] Don't create a subclass for equivalent types
...
Before, equivalent types, eg. otTables.BacktrackCoverage, etc,
where a subclass of their equivalent parent type, eg. otTables.Coverage
With this change, they are the same type.
The otBase and otConverters changes were needed to make the above
happen and still generate correct XML for SubTable type.
2016-01-13 16:44:52 +00:00
Sascha Brawer
cc749c9c73
[feaLib] Allow 63 chars in names of glyphs and glyph classes
...
Resolves https://github.com/behdad/fonttools/issues/460 .
See https://github.com/adobe-type-tools/afdko/pull/99 for
the change to the OpenType Feature File format specification.
2016-01-13 16:31:05 +01:00
Cosimo Lupo
a54a794f81
timeTools: define platform-independent 'asctime' function
...
Fixes https://github.com/behdad/fonttools/issues/455
2016-01-12 12:33:22 +00:00
Sascha Brawer
bfc3bff0e3
[feaLib] Support CID glyph names
...
Resolves https://github.com/behdad/fonttools/issues/459
2016-01-12 10:58:00 +01:00
Sascha Brawer
f2806c4de2
[feaLib] For testing, use dates without leading zeroes
...
On Windows, some Python versions format "Jan 01" while others
format "Jan 1"; this caused test failures on the build farm.
By using a date without leading zeros (2011-12-13), we can
work around this.
https://github.com/behdad/fonttools/issues/455
2016-01-11 19:36:19 +01:00
Sascha Brawer
67686691c4
[feaLib] Also handle feature aalt
without any custom lookups
...
Before this change, feaLib did not handle feature files that specified
`feature aalt` whose block just was referring to other features without
defining any lookups on its own. After this change, we can handle it.
Resolves https://github.com/behdad/fonttools/issues/441
2016-01-11 18:12:23 +01:00