The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Merge branch 'master' of github.com:johanmattssonm/birdfont

These changes was commited to the Birdfont repository Mon, 12 Oct 2015 12:42:44 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 12 Oct 2015 12:42:44 +0000 (14:42 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 12 Oct 2015 12:42:44 +0000 (14:42 +0200)
commit 96458a0022186243169f6510b5cace068fa7f625
tree d5028b0a4dfebd52a7f6e83b431d2e3822d53acb
parent 1881cf80d48b5e43371c217efa129ee37b02d21f
parent 302a74bad8589f7304a8d5eccff34c701f1a900f
Merge branch 'master' of github.com:johanmattssonm/birdfont

libbirdfont/Ligatures.vala
libbirdfont/OpenFontFormat/CligFeature.vala
libbirdfont/OpenFontFormat/ContextualLigature.vala
libbirdfont/OpenFontFormat/GsubTable.vala
libbirdfont/OpenFontFormat/LigatureCollection.vala
libbirdfont/OpenFontFormat/Lookups.vala
libbirdfont/Path.vala
--- a/libbirdfont/Ligatures.vala +++ b/libbirdfont/Ligatures.vala @@ -117,6 +117,7 @@ TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures (); + GlyphCanvas.redraw (); }); TabContent.show_text_input (listener); @@ -139,6 +140,7 @@ TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures (); + GlyphCanvas.redraw (); }); TabContent.show_text_input (listener); @@ -161,6 +163,7 @@ TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures (); + GlyphCanvas.redraw (); }); TabContent.show_text_input (listener); @@ -192,6 +195,7 @@ TabContent.hide_text_input (); MainWindow.get_ligature_display ().update_rows (); sort_ligatures (); + GlyphCanvas.redraw (); }); TabContent.show_text_input (listener);
--- a/libbirdfont/OpenFontFormat/CligFeature.vala +++ b/libbirdfont/OpenFontFormat/CligFeature.vala @@ -54,12 +54,12 @@ 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); }
--- a/libbirdfont/OpenFontFormat/ContextualLigature.vala +++ b/libbirdfont/OpenFontFormat/ContextualLigature.vala @@ -53,7 +53,7 @@ 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 @@ } 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
--- a/libbirdfont/OpenFontFormat/GsubTable.vala +++ b/libbirdfont/OpenFontFormat/GsubTable.vala @@ -44,7 +44,7 @@ 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 ()) {
--- a/libbirdfont/OpenFontFormat/LigatureCollection.vala +++ b/libbirdfont/OpenFontFormat/LigatureCollection.vala @@ -113,6 +113,7 @@ FontData set_data; uint16 ligature_pos; uint16 table_start; + int coverage_offset; FontData fd; fd = new FontData (); @@ -121,7 +122,9 @@ 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
--- a/libbirdfont/OpenFontFormat/Lookups.vala +++ b/libbirdfont/OpenFontFormat/Lookups.vala @@ -81,7 +81,12 @@ 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) {
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -2308,8 +2308,6 @@ && (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)"); } }