Clone in a terminal:
Commit b45bdf0
Johan Mattsson - 2013-07-28T01:21:40+00:00
b45bdf0144bcfb29b792de99c85f10b58f561330johan.mattsson.m@gmail.com

adjust margin in over view

Changed files (4)

Diff

diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex ad17ebc..1e9b64a 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -1070,9 +1070,7 @@ public class Glyph : FontDisplay { 		return open; 	} 	-	/** Close all editable paths and return false if no path have boon closed. -	 * Paths without area (points and lines) will be deleted.-	 */+	/** Close all editable paths and return false if no path have been closed. */ 	public bool close_path () { 		bool r = false; 		diff --git a/libbirdfont/OpenFontFormat/HeadTable.vala b/libbirdfont/OpenFontFormat/HeadTable.valaindex f8f8d74..187385e 100644--- a/libbirdfont/OpenFontFormat/HeadTable.vala+++ b/libbirdfont/OpenFontFormat/HeadTable.vala@@ -40,7 +40,7 @@ class HeadTable : Table { 	uint64 created; 	uint64 modified; 		-	uint16 units_per_em = 2048;+	uint16 units_per_em = 4096; 	 	const uint8 BASELINE_AT_ZERO = 1 << 0; 	const uint8 LSB_AT_ZERO = 1 << 1;diff --git a/libbirdfont/OverView.vala b/libbirdfont/OverView.valaindex 7219714..a315d4c 100644--- a/libbirdfont/OverView.vala+++ b/libbirdfont/OverView.vala@@ -214,6 +214,16 @@ public class OverView : FontDisplay {  		return visible_items.nth (selected).data; 	} 	+	int get_items_per_row () {+		int i = 1;+		double l = OverViewItem.full_width ();+		while (l < allocation.width) {+			l += OverViewItem.full_width ();+			i++;+		}+		return i - 1;+	}+		 	void update_item_list () { 		string character_string; 		Font f = BirdFont.get_current_font ();@@ -224,8 +234,9 @@ public class OverView : FontDisplay { 		unichar character; 		Glyph glyph; -		items_per_row = (int) (allocation.width / OverViewItem.full_width ());-		rows = (int) (allocation.height /  OverViewItem.full_height ());+		OverViewItem.margin = OverViewItem.width * 0.1;+		items_per_row = get_items_per_row ();+		rows = (int) (allocation.height /  OverViewItem.full_height ()) + 2; 		 		while (visible_items.length () > 0) { 			visible_items.remove_link (visible_items.first ());@@ -285,6 +296,7 @@ public class OverView : FontDisplay { 		 		foreach (OverViewItem i in visible_items) { 			i.y += view_offset_y;+			i.x += view_offset_x; 		} 	} 	diff --git a/libbirdfont/Path.vala b/libbirdfont/Path.valaindex f34a297..8467320 100644--- a/libbirdfont/Path.vala+++ b/libbirdfont/Path.vala@@ -1024,7 +1024,7 @@ public class Path { 		if (points.length () < 2) { 			return quadratic_path; 		}-+		 		i = points.first (); 		next = i.next; @@ -1047,6 +1047,8 @@ public class Path { 			quadratic_path.add_point (points.last ().data.copy ()); 		} 		+		quadratic_path.add_hidden_double_points ();+ 		quadratic_path.close (); 		quadratic_path.create_list (); 		process_quadratic_handles ();@@ -1055,7 +1057,7 @@ public class Path { 		quadratic_path.create_list (); 		process_cubic_handles (); 		-		quadratic_path.add_hidden_double_points ();+		quadratic_path.close (); 		 		return quadratic_path; 	}@@ -1069,7 +1071,7 @@ public class Path { 			return; 		} -		steps = (int) get_length_from (start, stop);+		steps = (int) (0.6 * get_length_from (start, stop)); 		 		// create quadratic paths 		all_of (start, stop, (x, y, step) => {

Contact

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