The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Store font size in spacing tab

These changes was commited to the Birdfont repository Sun, 30 Aug 2015 08:42:16 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 30 Aug 2015 08:42:16 +0000]

Updated Files

libbirdfont/MenuTab.vala
libbirdfont/SpacingTools.vala
--- a/libbirdfont/MenuTab.vala +++ b/libbirdfont/MenuTab.vala @@ -287,6 +287,15 @@ if (!is_null (KerningTools.zoom_bar)) { KerningTools.zoom_bar.zoom_level = k; KerningTools.zoom_bar.new_zoom (k); + } + } + + string spacing_zoom = f.settings.get_setting ("spacing_zoom"); + if (spacing_zoom != "") { + double sz = double.parse (spacing_zoom); + if (!is_null (SpacingTools.zoom_bar)) { + SpacingTools.zoom_bar.zoom_level = sz; + SpacingTools.zoom_bar.new_zoom (sz); } }
--- a/libbirdfont/SpacingTools.vala +++ b/libbirdfont/SpacingTools.vala @@ -32,11 +32,16 @@ zoom_bar = new ZoomBar (); zoom_bar.new_zoom.connect ((z) => { + Font f; + KerningTools.font_size = 3 * z; if (KerningTools.font_size < 0.1) { KerningTools.font_size = 0.1; } + + f = BirdFont.get_current_font (); + f.settings.set_setting ("spacing_zoom", @"$z"); GlyphCanvas.redraw (); });