The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fixes the art bug in ttf generation

These changes was commited to the Birdfont repository Tue, 17 Mar 2015 19:12:06 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Tue, 17 Mar 2015 19:12:06 +0000]

Updated Files

libbirdfont/CharacterInfo.vala
libbirdfont/Expander.vala
libbirdfont/LabelTool.vala
libbirdfont/OpenFontFormat/GsubTable.vala
libbirdfont/OverViewItem.vala
libbirdfont/Tool.vala
--- a/libbirdfont/CharacterInfo.vala +++ b/libbirdfont/CharacterInfo.vala @@ -35,7 +35,7 @@ ligature = ((!) gc).is_unassigned (); name = ((!) gc).get_name (); icon.load_font ("icons.bf"); - icon.use_cache (false); + icon.use_cache (true); } }
--- a/libbirdfont/Expander.vala +++ b/libbirdfont/Expander.vala @@ -232,7 +232,7 @@ if (headline != null) { title = new Text (); title.set_text ((!) headline); - title.use_cache (false); + title.use_cache (true); Theme.text_color (title, "Foreground 2"); title.set_font_size (17 * Toolbox.get_scale ()); title.draw_at_baseline (cr, x, yt + HEADLINE_MARGIN + 13 * Toolbox.get_scale ());
--- a/libbirdfont/LabelTool.vala +++ b/libbirdfont/LabelTool.vala @@ -103,7 +103,7 @@ center_y = bgy + (counter_box_height / 2.0 + 5); if (is_selected ()) { - Theme.text_color (glyph_count, "Foreground"); + Theme.text_color (glyph_count, "Foreground 1"); } else { Theme.text_color (glyph_count, "Foreground Inverted"); }
--- a/libbirdfont/OpenFontFormat/GsubTable.vala +++ b/libbirdfont/OpenFontFormat/GsubTable.vala @@ -73,14 +73,15 @@ contextual = new LigatureSetList.context (glyf_table); clig_subtable = get_ligature_subtable (clig); - chained_context = get_chaining_contextual_substition_subtable (); - chained_ligatures = get_ligature_subtable (contextual); + // FIXME: put back contextual ligatures + //chained_context = get_chaining_contextual_substition_subtable (); + //chained_ligatures = get_ligature_subtable (contextual); // lookup table - fd.add_ushort (3); // number of lookups + fd.add_ushort (1); // number of lookups FIXME: should be 3 fd.add_ushort (8); // offset to lookup 1 - fd.add_ushort (16); // offset to lookup 2 - fd.add_ushort (24); // offset to lookup 3 + //fd.add_ushort (16); // offset to lookup 2 + //fd.add_ushort (24); // offset to lookup 3 length = 0; fd.add_ushort (4); // lookup type @@ -89,6 +90,7 @@ fd.add_ushort (24 + length); // array of offsets to subtable length += (uint16) clig_subtable.length_with_padding (); + /* fd.add_ushort (6); // lookup type fd.add_ushort (0); // lookup flags fd.add_ushort (1); // number of subtables @@ -100,10 +102,10 @@ fd.add_ushort (1); // number of subtables fd.add_ushort (8 + length); // array of offsets to subtable length += (uint16) chained_ligatures.length_with_padding (); - + */ fd.append (clig_subtable); - fd.append (chained_context); - fd.append (chained_ligatures); + // fd.append (chained_context); + // fd.append (chained_ligatures); fd.pad ();
--- a/libbirdfont/OverViewItem.vala +++ b/libbirdfont/OverViewItem.vala @@ -34,6 +34,8 @@ public static double margin = 20; public static double glyph_scale = 1.0; + + Text icon; public OverViewItem (GlyphCollection? glyphs, unichar character, double x, double y) { this.x = x; @@ -41,6 +43,10 @@ this.character = character; this.glyphs = glyphs; this.info = new CharacterInfo (character, glyphs); + + icon = new Text ("dropdown_menu", 17); + icon.load_font ("icons.bf"); + icon.use_cache (true); } public string get_name () { @@ -268,15 +274,10 @@ private void draw_menu (Context cr) { GlyphCollection g; DropMenu menu; - Text icon; if (glyphs == null) { return; } - - icon = new Text ("dropdown_menu", 17); - icon.load_font ("icons.bf"); - icon.use_cache (true); if (selected) { Theme.text_color (icon, "Overview Selected Foreground");
--- a/libbirdfont/Tool.vala +++ b/libbirdfont/Tool.vala @@ -190,7 +190,7 @@ icon_file = Theme.get_icon_file (); icon_font = new Text ((!) name); found = icon_font.load_font (icon_file); - icon_font.use_cache (false); + icon_font.use_cache (true); icon_font.set_font_size (35); if (!found) {