The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Merge ../birdfont-2.x

These changes was commited to the Birdfont repository Sun, 04 Dec 2016 20:00:00 +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>
Sun, 04 Dec 2016 20:00:00 +0000 (21:00 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 04 Dec 2016 20:00:00 +0000 (21:00 +0100)
commit fb0a58e40be9bcd2270d2a7fa1b64d412df4366e
tree 8994492600bb7da5b083e60765315f45e01e14a9
parent 4e7839bd7ca30cc66f922d2dc835454ecad90388
parent dc9e16d10f600bc46d386fef8b7332669ecbc1e7
Merge ../birdfont-2.x

libbirdfont/KerningDisplay.vala
libbirdfont/Menu.vala
libbirdfont/SvgFontFormatWriter.vala
--- a/libbirdfont/KerningDisplay.vala +++ b/libbirdfont/KerningDisplay.vala @@ -46,7 +46,7 @@ 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 @@ 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 ()); }
--- a/libbirdfont/Menu.vala +++ b/libbirdfont/Menu.vala @@ -396,7 +396,12 @@ 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 @@ 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");
--- a/libbirdfont/SvgFontFormatWriter.vala +++ b/libbirdfont/SvgFontFormatWriter.vala @@ -60,6 +60,8 @@ 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 @@ 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)