Sascha Brawer
96223b8aee
[feaLib] Implement GPOS type 5: Mark-to-ligature attachment positioning
2015-12-09 16:51:15 +01:00
Sascha Brawer
d622f99982
[feaLib] Clean up class names of Abstract Syntax Tree statements
...
The class names of tree nodes for substitution and positioning rules
are now consistent with `builder.py`, which in turn is consistent with
`otTables.py`.
2015-12-09 13:58:05 +01:00
Sascha Brawer
5b1b1d17f6
[feaLib] Restructure MarkBasePosBuilder in preparation of MarkLigPosBuilder
...
The upcoming MarkLigPosBuilder will have some parts in common with
MarkBasePosBuilder. Move these common parts into a helper method,
so that MarkLigPosBuilder will be able to call them.
Also, clean up the structure of MarkBasePosBuilder.
2015-12-09 13:23:50 +01:00
Sascha Brawer
7e846691e4
[feaLib] Consistently name LookupBuilders after their OpenType subtable class
2015-12-09 12:59:20 +01:00
Sascha Brawer
652bbeb51b
[feaLib] Centralize how lookups are built from subtables
2015-12-09 12:51:01 +01:00
Sascha Brawer
320a4a57c6
[feaLib] Centralize the building of coverage tables
2015-12-09 12:30:57 +01:00
Sascha Brawer
0fbbe037bf
[feaLib] Implement GPOS type 4: Mark-to-Base Attachment Positioning
2015-12-08 22:28:02 +01:00
Sascha Brawer
790ea83a02
[feaLib] Parse GPOS type 4 aka Mark-to-Base Attachment Positioning
...
However, no output tables are being built yet. This change is just
implementing the feature file parser.
2015-12-08 19:04:42 +01:00
Sascha Brawer
dfa1551ece
[feaLib] Implement markClass
statement
2015-12-08 17:04:21 +01:00
Sascha Brawer
c6ee46f299
[feaLib] Implement GPOS type 3: Cursive Attachment Positioning
2015-12-07 23:56:08 +01:00
Sascha Brawer
b0fda8ec45
[feaLib] Replace invocation of deprecated has_key()
by in
2015-12-07 22:49:20 +01:00
Sascha Brawer
bdc72e1198
[feaLib] Do not emit empty GSUB and GPOS tables
...
The AFDKO `makeotf` tool does not emit empty tables, either.
2015-12-07 21:38:41 +01:00
Sascha Brawer
3433f363e7
[feaLib] Implement GPOS type 2, format 1
2015-12-07 21:26:58 +01:00
Sascha Brawer
46983f573f
[feaLib] Parse GPOS type 2 format A and B, and ValueRecord format D
...
This is just the change on the parser. Building the output tables
is still marked as a TODO.
2015-12-07 17:18:18 +01:00
Sascha Brawer
83dbae1da5
[feaLib] Do not emit any Value if ValueFormat is 0
2015-12-07 11:47:55 +01:00
Sascha Brawer
117683680e
[feaLib] Emit SinglePos (GPOS type 1) in format 2 when this is more compact
2015-12-07 11:39:14 +01:00
moyogo
c01b956ae7
[feaLib] make Device Table from device tuples
2015-12-05 08:56:46 +00:00
Sascha Brawer
46c76dbf1f
[feaLib] Parse ValueRecord format C
...
However, not sure how to build the otTables object graph for emitting
GPOS tables with device values; the current code thus silently strips
off any device values. Left a TODO comment for implementing this.
2015-12-04 15:49:04 +01:00
Sascha Brawer
b99f1c9af4
[feaLib] Implement GPOS type 1, Single Adjustment Positioning
2015-12-04 12:22:01 +01:00
Sascha Brawer
f45fab8c3a
[feaLib] Sort GSUB glyph coverage tables by glyph ID
...
Before this change, feaLib would sort coverage tables by glyph name,
which is against the OpenType specification. The current unittests
happen to use only glyphs where the ordering is identical whether
sorting by name or by ID; but I am about to add unittests (for GPOS)
where the ordering is different.
The ordering cannot be enforced by otTables because otTables does
not have access to the font's glyph order; therefore, the sorting
needs to happen inside feaLib.
2015-12-04 11:11:17 +01:00
Sascha Brawer
cab0067c7e
[feaLib] Implement GSUB LookupType 8: Reverse chaining single substitutions
2015-12-03 13:05:42 +01:00
Sascha Brawer
152dff4361
[feaLib] Implement GSUB chain substitution rules
2015-11-30 15:02:09 +01:00
Sascha Brawer
37a79a330c
[feaLib] Fix generated LigatureSubst lookups
2015-10-27 22:53:50 +01:00
Sascha Brawer
75e4053e39
[feaLib] Handle references to named lookup blocks
2015-09-28 16:49:17 +02:00
Sascha Brawer
17ab15c4af
[feaLib] Implement GSUB lookup type 2
2015-09-10 15:28:02 +02:00
Cosimo Lupo
efea2c17de
[feaLib] make LookupBuilder.build return Lookup instances, instead of raw subtables
...
The list of subtables should go in the 'SubTable' attribute of Lookup object.
This also sets the 'LookupType', 'LookupFlag' and 'SubTableCount' attributes.
2015-09-09 18:13:28 +01:00
Sascha Brawer
4846f9006f
[feaLib] Use fontTools wrapper class for otTable's GSUB/GPOS tables
...
Resolves df740092d9 (commitcomment-13138084)
2015-09-09 17:00:27 +02:00
Sascha Brawer
a35291e8c1
[feaLib] Implement required
qualifier on language
statements
2015-09-08 15:55:54 +02:00
Sascha Brawer
a3783e1095
[feaLib] Reject language
and script
within feature aalt
and size
2015-09-08 12:18:03 +02:00
Sascha Brawer
792a958d6c
[feaLib] Implement parser for multiple substitutions (GSUB LookupType 2)
...
Actually building the GSUB table is not implemented yet, since this
will probably need changes to otTables.
2015-09-08 12:05:44 +02:00
Sascha Brawer
683a8f5dbc
[feaLib] Reject duplicate languagesystem declarations
2015-09-08 10:56:07 +02:00
Sascha Brawer
b0bbce88b1
[feaLib] Implement Single Substitution (GSUB lookup type 1)
2015-09-08 10:33:07 +02:00
Sascha Brawer
c1ba66c2ea
[feaLib] Write LangSysRecords to GSUB and GPOS tables
2015-09-07 22:03:50 +02:00
Sascha Brawer
6140a4ec2b
[feaLib] Build ScriptList subtable
...
Also, fixed a bug that caused language tags to be sometimes stripped.
Added an assertion to verify that language tags are always 4 chars.
2015-09-07 21:34:10 +02:00
Sascha Brawer
d3c743bb27
[feaLib] Build feature tables
2015-09-07 17:22:37 +02:00
Sascha Brawer
2537a4da29
[feaLib] Enforce uniform lookup types inside named lookup blocks
2015-09-07 16:27:12 +02:00
Sascha Brawer
80de401c09
[feaLib] Implement ligature substitutions
2015-09-07 16:10:13 +02:00
Sascha Brawer
8e8a0d68c7
[feaLib] Prohibit script
and language
statements within named lookups
2015-09-07 13:33:44 +02:00
Sascha Brawer
5f2e55d5fc
[feaLib] Emit lookups for alternate substitutions
2015-09-07 11:39:09 +02:00
Sascha Brawer
102c0e0e56
[feaLib] Handle languagesystem
, script
and languaguage
statements
...
Currently, the compiler uses them to figure out which set of
languagesystems would apply for the current scope. However, this
information is not yet used for anything.
2015-09-07 11:39:09 +02:00
Sascha Brawer
df740092d9
[feaLib] Basic test framework for building OpenType features
2015-09-07 11:39:09 +02:00