Commit fb0a58e
Merge ../birdfont-2.x
Changed files (3)
modifiedlibbirdfont/KerningDisplay.valamodifiedlibbirdfont/Menu.valamodifiedlibbirdfont/SvgFontFormatWriter.vala
Diff
@@ -46,7 +46,7 @@ public class KerningDisplay : FontDisplay { public bool adjust_side_bearings = false; public bool right_side_bearing = true; - public bool right_to_left = false; + public static bool right_to_left = false; WidgetAllocation allocation = new WidgetAllocation (); @@ -202,7 +202,7 @@ public class KerningDisplay : FontDisplay { glyph.add_help_lines (); if (right_to_left) {- cr.translate (x - kern - glyph.get_lsb () - glyph.get_width () - Glyph.xc (), glyph.get_baseline () + y - Glyph.yc ());+ cr.translate (-kern + x - glyph.get_lsb () - glyph.get_width () - Glyph.xc (), glyph.get_baseline () + y - Glyph.yc ()); } else { cr.translate (kern + x - glyph.get_lsb () - Glyph.xc (), glyph.get_baseline () + y - Glyph.yc ()); }@@ -396,7 +396,12 @@ public class Menu : AbstractMenu { MenuItem next_kerning_pair = add_menu_item (t_("Select Next Kerning Pair"), "select next kerning pair"); next_kerning_pair.action.connect (() => {- KerningDisplay.next_pair ();+ if (KerningDisplay.right_to_left) {+ KerningDisplay.previous_pair (); + } else {+ KerningDisplay.next_pair ();+ }+ show_menu = false; }); next_kerning_pair.add_display("Kerning");@@ -405,7 +410,12 @@ public class Menu : AbstractMenu { MenuItem previous_kerning_pair = add_menu_item (t_("Select Previous Kerning Pair"), "select previous kerning pair"); previous_kerning_pair.action.connect (() => {- KerningDisplay.previous_pair ();+ if (KerningDisplay.right_to_left) {+ KerningDisplay.next_pair (); + } else {+ KerningDisplay.previous_pair ();+ }+ show_menu = false; }); previous_kerning_pair.add_display("Kerning");@@ -60,6 +60,8 @@ class SvgFontFormatWriter : GLib.Object { put ("<defs>"); string font_id = font_name.replace (" ", "-");+ font_id = B.XmlParser.encode (font_id); + Glyph space = font.get_space ().get_current (); double space_width = space.get_width (); @@ -67,7 +69,7 @@ class SvgFontFormatWriter : GLib.Object { put (@"<font-face units-per-em=\"$(to_float (units_per_em))\" ascent=\"$(to_float (ascent))\" descent=\"$(to_float (descent))\" />"); put (@"<font-src>");- put (@"\t<font-face-name=\"$font_name\">");+ put (@"\t<font-face-name=\"XmlParser.encode ($font_name)\">"); put (@"</font-src>"); // (missing-glyph goes here)