The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fi ligature

These changes was commited to the Birdfont repository Thu, 02 Oct 2014 17:47:37 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Thu, 02 Oct 2014 17:47:37 +0000]

Updated Files

libbirdfont/OpenFontFormat/DirectoryTable.vala
libbirdfont/OpenFontFormat/Gsub.vala
--- a/libbirdfont/OpenFontFormat/DirectoryTable.vala +++ b/libbirdfont/OpenFontFormat/DirectoryTable.vala @@ -92,7 +92,7 @@ tables.add (this); tables.add (gpos_table); - //tables.add (gsub_table); + tables.add (gsub_table); tables.add (os_2_table);
--- a/libbirdfont/OpenFontFormat/Gsub.vala +++ b/libbirdfont/OpenFontFormat/Gsub.vala @@ -53,7 +53,7 @@ // feature table fd.add_ushort (1); // number of features - fd.add_tag ("clig"); // contextual ligatures, single substitution + fd.add_tag ("clig"); // feature tag fd.add_ushort (8); // offset to feature fd.add_ushort (0); // feature prameters (null) @@ -63,27 +63,42 @@ // lookup table fd.add_ushort (1); // number of lookups fd.add_ushort (4); // offset to lookup 1 + + fd.add_ushort (4); // lookup type // FIXME + fd.add_ushort (0); // lookup flags + fd.add_ushort (1); // number of subtables + fd.add_ushort (8); // array of offsets to subtable // ligature substitution subtable - fd.add_ushort (1); // lookup type, format identifier - fd.add_ushort (20); // offset to coverage + fd.add_ushort (1); // format identifier + fd.add_ushort (8); // offset to coverage fd.add_ushort (1); // number of ligature set tables - fd.add_ushort (10); // array of offsets to ligature sets + fd.add_ushort (18); // array of offsets to ligature sets - // ligature sets - fd.add_ushort (1); // number of offsets - fd.add_ushort (4); // offset to ligature table + // coverage + fd.add_ushort (2); // format + fd.add_ushort (1); // num ranges + fd.add_ushort ((uint16) glyf_table.get_gid ("f")); // start gid + fd.add_ushort ((uint16) glyf_table.get_gid ("f")); // end gid + fd.add_ushort (0); // coverage start index - // ligatures - fd.add_ushort ((uint16) glyf_table.get_gid ("fi")); // gid of ligature + // ligature + fd.add_ushort (3); // number of ligatures in this set + fd.add_ushort (8); // offset to ligature + fd.add_ushort (14); // offset to ligature + fd.add_ushort (20); // offset to ligature + + fd.add_ushort ((uint16) glyf_table.get_gid ("fi")); // DELETE); + fd.add_ushort (2); // number of components + fd.add_ushort ((uint16) glyf_table.get_gid ("i")); // gid to component + + fd.add_ushort ((uint16) glyf_table.get_gid ("fi")); // DELETE); + fd.add_ushort (2); // number of components + fd.add_ushort ((uint16) glyf_table.get_gid ("i")); // gid to component + + fd.add_ushort ((uint16) glyf_table.get_gid ("fi")); // DELETE); fd.add_ushort (2); // number of components - fd.add_ushort ((uint16) glyf_table.get_gid ("f")); // gid to component fd.add_ushort ((uint16) glyf_table.get_gid ("i")); // gid to component - - // coverage - fd.add_ushort (1); // format - fd.add_ushort (1); // num glyphs - fd.add_ushort ((uint16) glyf_table.get_gid ("f")); // gid fd.pad (); this.font_data = fd;