Commit b4abe6d
Fixes the art bug in ttf generation
Changed files (6)
modifiedlibbirdfont/CharacterInfo.valamodifiedlibbirdfont/Expander.valamodifiedlibbirdfont/LabelTool.valamodifiedlibbirdfont/OpenFontFormat/GsubTable.valamodifiedlibbirdfont/OverViewItem.valamodifiedlibbirdfont/Tool.vala
Diff
@@ -35,7 +35,7 @@ public class CharacterInfo : GLib.Object { ligature = ((!) gc).is_unassigned (); name = ((!) gc).get_name (); icon.load_font ("icons.bf");- icon.use_cache (false);+ icon.use_cache (true); } } @@ -232,7 +232,7 @@ public class Expander : GLib.Object { 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 ());@@ -103,7 +103,7 @@ public class LabelTool : Tool { 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"); }@@ -73,14 +73,15 @@ public class GsubTable : OtfTable { 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 @@ public class GsubTable : OtfTable { 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 @@ public class GsubTable : OtfTable { 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 (); @@ -35,12 +35,18 @@ public class OverViewItem : GLib.Object { public static double glyph_scale = 1.0; + Text icon;+ public OverViewItem (GlyphCollection? glyphs, unichar character, double x, double y) { this.x = x; this.y = y; 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,16 +274,11 @@ public class OverViewItem : GLib.Object { 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"); } else {@@ -190,7 +190,7 @@ public class Tool : Widget { 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) {