Commit 96458a0
Merge branch 'master' of github.com:johanmattssonm/birdfont
Changed files (7)
modifiedlibbirdfont/Ligatures.valamodifiedlibbirdfont/OpenFontFormat/CligFeature.valamodifiedlibbirdfont/OpenFontFormat/ContextualLigature.valamodifiedlibbirdfont/OpenFontFormat/GsubTable.valamodifiedlibbirdfont/OpenFontFormat/LigatureCollection.valamodifiedlibbirdfont/OpenFontFormat/Lookups.valamodifiedlibbirdfont/Path.vala
Diff
@@ -117,6 +117,7 @@ public class Ligatures : GLib.Object { TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures ();+ GlyphCanvas.redraw (); }); TabContent.show_text_input (listener); @@ -139,6 +140,7 @@ public class Ligatures : GLib.Object { TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures ();+ GlyphCanvas.redraw (); }); TabContent.show_text_input (listener); @@ -161,6 +163,7 @@ public class Ligatures : GLib.Object { TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures ();+ GlyphCanvas.redraw (); }); TabContent.show_text_input (listener);@@ -192,6 +195,7 @@ public class Ligatures : GLib.Object { TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures ();+ GlyphCanvas.redraw (); }); TabContent.show_text_input (listener); @@ -54,12 +54,12 @@ public class CligFeature : GLib.Object { if (contextual.has_ligatures ()) { foreach (LigatureCollection s in contextual.ligatures) {- lookup = new Lookup (4, 0);+ lookup = new Lookup (4, 0, "chained data"); lookup.add_subtable (s.get_font_data (glyf_table)); lookups.add_lookup(lookup); } - lookup = new Lookup (6, 0, "chained");+ lookup = new Lookup (6, 0, "chain context"); foreach (FontData d in chain_data) { lookup.add_subtable (d); }@@ -53,7 +53,7 @@ public class ContextualLigature : GLib.Object { Gee.ArrayList<string> lookahead = font.get_names (lookahead); uint16 lookahead_offset, input_offset, backtrack_offset;- + fd.add_ushort (3); // format identifier backtrack_offset = 14 + (uint16) (lookahead.size * 2) + (uint16) (input.size * 2) + (uint16) (backtrack.size * 2);@@ -75,6 +75,7 @@ public class ContextualLigature : GLib.Object { } fd.add_ushort (1); // substitute count+ // substitution lookup records fd.add_ushort (0); // glyph sequence index for the character that will be substituted fd.add_ushort (ligature_lookup_index); // go to the ligature substitution via lookup table@@ -44,7 +44,7 @@ public class GsubTable : OtfTable { Feature clig_feature_lookup = new Feature ("clig", lookups); if (clig_feature.contextual.has_ligatures ()) {- clig_feature_lookup.add_feature_lookup ("chained");+ clig_feature_lookup.add_feature_lookup ("chain context"); } if (clig_feature.has_regular_ligatures ()) {@@ -113,6 +113,7 @@ public class LigatureCollection : GLib.Object { FontData set_data; uint16 ligature_pos; uint16 table_start;+ int coverage_offset; FontData fd; fd = new FontData ();@@ -121,7 +122,9 @@ public class LigatureCollection : GLib.Object { table_start = (uint16) fd.length_with_padding (); fd.add_ushort (1); // format identifier- fd.add_ushort (6 + (uint16) (2 * ligature_sets.size)); // offset to coverage+ + coverage_offset = 6 + 2 * ligature_sets.size;+ fd.add_ushort ((uint16) coverage_offset); // offset to coverage fd.add_ushort ((uint16) ligature_sets.size); // number of ligature set tables // array of offsets to ligature sets@@ -81,7 +81,12 @@ public class Lookups : GLib.Object { foreach (Lookup lookup in tables) { uint offset_pos = lookup.entry_offset + 6; fd.seek (offset_pos);- fd.add_ushort ((uint16) (fd.length_with_padding () - (lookup.entry_offset)));+ + uint offset = (fd.length_with_padding () - (lookup.entry_offset));+ foreach (FontData f in lookup.subtables) {+ fd.add_ushort ((uint16) offset);+ offset += f.length_with_padding ();+ } fd.seek_end (); foreach (FontData subtable in lookup.subtables) {@@ -2308,8 +2308,6 @@ public class Path : GLib.Object { && (ep.flags & EditPoint.CURVE_KEEP) == 0 && (ep.flags & EditPoint.SEGMENT_END) == 0) { ep.deleted = true;- warning (ep.to_string ());- warning (@"A: EditPoint.CURVE_KEEP: $(EditPoint.CURVE_KEEP) $(ep.flags & EditPoint.CURVE_KEEP)"); } }