Clone in a terminal:
Commit 0d11a34
Johan Mattsson - 2017-06-11T12:53:33+00:00
0d11a348583a47eca5dbdd69f2bd57bb2c7f41b5johan.mattsson.m@gmail.com

Fix full glyph zoom

Changed files (2)

Diff

diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex fb55da3..37c875e 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -1330,14 +1330,20 @@ public class Glyph : FontDisplay {  		reset_zoom (); -		foreach (var p in get_visible_paths ()) {-			p.update_region_boundaries ();--			if (p.points.size > 2) {-				if (p.xmin < ax) ax = p.xmin;-				if (p.ymin < ay) ay = p.ymin;-				if (p.xmax > bx) bx = p.xmax;-				if (p.ymax > by) by = p.ymax;+		foreach (SvgBird.Object o in get_visible_objects ()) {+			bool include = true;+			+			if (o is SvgPath) {+				Path p = ((PathObject) o).path;+				include = p.points.size > 1;+				p.update_region_boundaries ();+			}+			+			if (include) {+				if (o.xmin < ax) ax = o.xmin;+				if (o.ymin < ay) ay = o.ymin;+				if (o.xmax > bx) bx = o.xmax;+				if (o.ymax > by) by = o.ymax; 			} 		} @@ -1350,7 +1356,7 @@ public class Glyph : FontDisplay {  		show_zoom_area (iax, iay, ibx, iby); // set this later on button release 		set_zoom_from_area ();-		zoom_out (); // add some margin+		zoom_out (); // add margin  		redraw_area (0, 0, allocation.width, allocation.height); 		update_zoom_bar ();diff --git a/libbirdfont/ZoomTool.vala b/libbirdfont/ZoomTool.valaindex 7b407f1..6c75966 100644--- a/libbirdfont/ZoomTool.vala+++ b/libbirdfont/ZoomTool.vala@@ -116,8 +116,7 @@ public class ZoomTool : Tool { 	}  	public void zoom_full_glyph () {-		store_current_view ();-		+		store_current_view ();		 		MainWindow.get_current_display ().zoom_min (); 	} 	

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112