Clone in a terminal:
Commit 9bd7830
Johan Mattsson - 2012-09-13T15:14:28+00:00
9bd78305ff2fc86c1507b96696823b8e9c9dd813johan.mattsson.m@gmail.com

new .notdef character

Changed files (2)

Diff

diff --git a/src/Font.vala b/src/Font.valaindex 4eafbbf..cbfe238 100644--- a/src/Font.vala+++ b/src/Font.vala@@ -277,16 +277,16 @@ class Font : GLib.Object { 		g.left_limit = -33; 		g.right_limit = 33; 		-		p.add (-20, 20);-		p.add (20, 20);-		p.add (20, -20);-		p.add (-20, -20);+		p.add (-20, -top_position - 5);+		p.add (20, -top_position - 5);+		p.add (20, -base_line + 5);+		p.add (-20, -base_line + 5); 		p.close (); 		-		i.add (-15, 15);-		i.add (15, 15);-		i.add (15, -15);-		i.add (-15, -15);+		i.add (-15, -top_position - 10);+		i.add (15, -top_position - 10);+		i.add (15, -base_line + 10);+		i.add (-15, -base_line + 10); 		i.reverse (); 		i.close (); diff --git a/src/Glyph.vala b/src/Glyph.valaindex f80a2aa..67728a2 100644--- a/src/Glyph.vala+++ b/src/Glyph.vala@@ -1760,10 +1760,13 @@ class Glyph : FontDisplay { 		for (int i = pos + 1; i < glyph_sequence.char_count (); i++) { 			c = glyph_sequence.get_char (i); 			name = font.get_name_for_character (c);			-			juxtaposed = (font.has_glyph (name)) ? (!) font.get_glyph (name) : font.get_not_def_character ();-			kern = font.get_kerning (last_name, name);--			print (@"name $name is empty?: $(juxtaposed.is_empty ())\n");+			juxtaposed = (font.has_glyph (name)) ? (!) font.get_glyph (name) : font.get_space ();+			+			if (font.has_glyph (last_name) && font.has_glyph (name)) {+				kern = font.get_kerning (last_name, name);+			} else {+				kern = 0;+			}  			if (!juxtaposed.is_empty ()) { 				cr.save ();@@ -1782,8 +1785,13 @@ class Glyph : FontDisplay { 		for (int i = pos - 1; i >= 0; i--) { 			c = glyph_sequence.get_char (i); 			name = font.get_name_for_character (c);			-			juxtaposed = (font.has_glyph (name)) ? (!) font.get_glyph (name) : font.get_not_def_character ();-			kern = font.get_kerning (name, last_name);+			juxtaposed = (font.has_glyph (name)) ? (!) font.get_glyph (name) : font.get_space ();+			+			if (font.has_glyph (last_name) && font.has_glyph (name)) {+				kern = font.get_kerning (name, last_name);+			} else {+				kern = 0;+			} 			 			x -= juxtaposed.get_width (); 			x -= kern;

Contact

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