120 Commits

Author SHA1 Message Date
Martin Hosken
eb9eebf972 Use glyph names not glyph ids 2017-09-19 15:45:44 +02:00
Martin Hosken
860a8e0522 Handle all Graphite tables now 2017-09-19 15:45:44 +02:00
Sascha Brawer
db0d193db6 [AAT] Support cidg table with CID-to-glyph mapping 2017-09-06 12:52:22 +02:00
Sascha Brawer
0f05f824d2 [AAT] Support gcid table with glyph-to-CID mapping 2017-09-06 01:40:49 +02:00
Sascha Brawer
ee1662e57e [AAT] Support morx tables with contextual substitution 2017-09-05 23:01:21 +02:00
Sascha Brawer
31b02d0bed [AAT] Support morx tables with Rearrangement subtables 2017-09-04 21:26:53 +02:00
Sascha Brawer
92124ee5a6 [AAT] Implement anchor point table
The AAT `ankr` anchor point table is an auxiliary table for `kerx`,
used to store anchor overrides in case the glyph itself does not
supply the needed anchors as control points. Among the fonts that
come pre-installed with MacOS 10.12.6, `ankr` is used by a handful
of non-Latin fonts such as “Myanmar MN”, “Devanagari Sangam MN”,
and “Arial HB”.

https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ankr.html
2017-08-31 11:45:18 +02:00
Sascha Brawer
90f257cc60 [AAT] Support mort and morx tables with non-contextual substitutions
Other metamorphosis types are not yet supported and will raise an error
upon decompilation. The TTX tool catches the error and continues to emit
a hexdump of the table contents, just as before this change.
2017-08-30 14:46:34 +02:00
Sascha Brawer
13fe9b5c34 [AAT] Make lcar ligature carets table a format-switching table
For consistency with other AAT tables, and to support additional
formats in the (rather unlikely) case those would ever be defined.
2017-08-25 14:53:43 +02:00
Sascha Brawer
f5793401ce [AAT] Implement bsln baseline table
The AAT baseline table uses arrays whose length is constant instead of
getting encoded in the data. Extended otBase to support such arrays.
2017-08-25 03:55:06 -07:00
Sascha Brawer
a47f658855 [AAT] Support the opbd table with optical bounds
Interestingly, this can handle the examples from the AAT specification
(which are part of the unit tests), and also most AAT fonts on my disk.
However, some other AAT fonts such as Apple Chancery cannot be decompiled.
The failure seems to be a general problem with how fonttools decompiles
AAT lookups of format 4, and unrelated to this present change.
2017-08-18 08:39:44 -07:00
Sascha Brawer
d05617b4bd [AAT] Support prop table with glyph properties 2017-08-17 11:09:53 -07:00
Sascha Brawer
77876e8df4 [AAT] Add table definitions for lcar table
After this change, fonttools is able to dump the `lcar` table of
the AppleChancery font to XML. However, the resulting XML cannot
be compiled back to TrueType, yet. So, something is still broken
with the implementation of AAT lookups. Need to do more testing
before the support for table `lcar` can be added to fonttools.
2017-08-16 02:42:55 +02:00
Sascha Brawer
020f7391ef [morx] Parametrize AATLookup value type in otData 2017-08-14 21:34:15 +02:00
Sascha Brawer
7f774ae84c [morx] Change MorphType to uint8, to comply with the spec 2017-08-14 21:34:15 +02:00
Sascha Brawer
f56b71937d Add missing parts from morx branch
After this change, the `morx` table in Zapfino.ttf can be ttx'ed again.
2017-08-14 21:34:15 +02:00
Rob McKaughan
b8e2d90cda Add AxisValueFormat4 for STAT table v1.2 from OT v1.8.2. 2017-07-24 16:12:31 -07:00
Miguel Sousa
4a8c1511ec [otData] Label AxisNameID as NameID 2017-07-14 00:08:52 -07:00
Behdad Esfahbod
0cc1721b8d [MVAR] Update for OT 1.8.1 rename 2017-01-10 11:01:06 -08:00
Behdad Esfahbod
b4d53811e9 Implement MVAR table 2016-12-18 21:55:45 -06:00
Denis Moyogo Jacquerye
250017289b Revert "[STAT] It was decided to NOT bump minor version..."
This reverts commit 06de8ce81824f737a1e35bfb00b1f68db767037e.
2016-12-12 16:42:55 +00:00
Behdad Esfahbod
06de8ce818 [STAT] It was decided to NOT bump minor version...
...since no one implements STAT so far.  So, version stays at 1.0.
2016-12-07 18:11:50 -08:00
Behdad Esfahbod
9ca34a08ec [STAT] Update for version 1.1; hasn't made it into spec yet! 2016-12-04 21:22:47 -08:00
Sascha Brawer
8b78a7890f [STAT] Fix unit tests and implementation of STAT table
Still need to look at one failing test case. Disabling it for now.
2016-12-02 15:26:49 -08:00
Sascha Brawer
84da076bb9 [STAT] Fix one test case 2016-12-02 14:54:03 -08:00
Behdad Esfahbod
d80bb58723 More STAT 2016-12-02 14:14:48 -08:00
Behdad Esfahbod
913b3c477c Finish STAT table
Test needs fix.
2016-12-02 14:06:13 -08:00
Sascha Brawer
59368c424a WIP: Implement STAT table 2016-12-02 13:37:42 -08:00
Sascha Brawer
0588502771 Add otConverters.NameID (#708)
When writing XML, this produces a comment with the English name.
If the name ID is missing from the name table, it logs a warning.
2016-10-14 21:04:35 +02:00
Behdad Esfahbod
e9ab61c5b5 [GX] Fix FeatureVariations 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
2f38f4a05a [GX] Fix typo 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
6b564d7d66 [varLib] Add FeatureVariations to GSUB/GPOS
Based on patch from Read Roberts.
2016-09-27 19:49:41 +02:00
Behdad Esfahbod
402d726692 [ot] Change Version to be an integer instead of float
API Change:
This will change XML output for GSUB/GPOS/GDEF/MATH/BASE/JSTF/...
Scripts that set the Version for those to 1.0 or other float values
also need fixing.  A warning is emitted when code or XML needs fix.
2016-09-27 19:49:41 +02:00
Behdad Esfahbod
72fe29359b [varLib] Start building Device table for variations 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
3064985880 VarStore: Remove Reserved field 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
47a7dde070 [varLib] Make VarData.NumShorts automatic 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
f11414c93b [varLib] Implement new VarData, aka. ItemVariationData, table 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
38c88f6996 [varLib] Rename VarTuple to VarRegion 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
e7163eddb0 [varLib] Rename VarTupleList to VarRegionList
Aka. ItemVariationRegionList.
2016-09-27 19:49:41 +02:00
Behdad Esfahbod
35a401f04d [varLib] Add support for VarIdxMap, aka. DeltaSetIndexMap.
Update HVAR / VVAR to latest draft.
2016-09-27 19:49:41 +02:00
Behdad Esfahbod
c1717224da [varLib] Generate direct HVAR 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
e2da17e032 [opentype-gx/varLib] More work towards VariationStore
And HVAR/VVAR tables.
2016-09-27 19:49:41 +02:00
Behdad Esfahbod
32dd2e9e7e Add a VarStore at the end of GDEF 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
4d7b5f6472 [varLib] Start implementing VariationStore 2016-09-27 19:49:41 +02:00
Behdad Esfahbod
754a20d987 Implement lazy array for loading otData-driven arrays
Speeds up subsetting of GPOS table with many pairs by huge factor
(counted 5).
2015-07-02 18:00:41 -07:00
Sascha Brawer
5bd9ade399 [GX] Remove ‘fvar’ table definition from otTables.py
There now is a Python implementation of variation axes, because this
makes it (much) easier to build variable fonts from code. Therefore,
the definitions in otTables.py are not needed anymore.
2015-06-24 15:58:05 +02:00
Behdad Esfahbod
6c83fe4846 Really fix SingleSubst delta math
I had broken this in e06166b83aa82582dab2e011520b1a77f72aa9f9.

Fix that, and other issues.  Since I made that last commit, it has
become clear that SingleSubst works by adding delta and then doing
module 65536.

HarfBuzz was updated for this in 2011:
commit 52ebdff49d13f239efc886de935d47be9860f6e5
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Tue Sep 27 12:38:16 2011 -0400

    Fix GSUB lookuptype 1 subtype 1 delta wrapping
2015-06-12 10:27:04 -07:00
Behdad Esfahbod
7c9ab300c2 Add standard imports to all python sources
Previously, the trivial files didn't have them.
2015-04-14 17:26:59 -07:00
Behdad Esfahbod
b9ac90a8f9 [GX] Add 'fvar' table support
I might change the table format in the future, but it's functional now.
2015-03-11 15:29:35 -07:00
Behdad Esfahbod
0d5d12e02a Adjust 'feat' table format
As discussed here:
730bedd3d1
2015-01-21 15:46:30 -08:00