Clone in a terminal:
Commit 0d1d2c4
Johan Mattsson - 2012-08-29T17:13:07+00:00
0d1d2c4c1fa709798a7ba7b734fa706bffbae2a0johan.mattsson.m@gmail.com

add .null and nonmarkingreturn characters to ttf-fonts

Changed files (2)

Diff

diff --git a/src/Font.vala b/src/Font.valaindex e5eae05..59a1ae1 100644--- a/src/Font.vala+++ b/src/Font.vala@@ -228,7 +228,7 @@ class Font : GLib.Object { 		} 				 		ret = new Glyph ("nonmarkingreturn", '\r');-		ret.set_unassigned (true);+		ret.set_unassigned (false); 		ret.left_limit = 0; 		ret.right_limit = 0; 		ret.remove_empty_paths ();@@ -246,7 +246,7 @@ class Font : GLib.Object { 		} 		 		n = new Glyph ("null", '\0');-		n.set_unassigned (true);+		n.set_unassigned (false); 		n.left_limit = 0; 		n.right_limit = 0; 		n.remove_empty_paths ();diff --git a/src/OpenFontFormatWriter.vala b/src/OpenFontFormatWriter.valaindex 44f355d..46d0ad3 100644--- a/src/OpenFontFormatWriter.vala+++ b/src/OpenFontFormatWriter.vala@@ -1575,8 +1575,8 @@ class GlyfTable : Table { 
 		// add notdef. character at index zero + other special chars first
 		glyphs.append (font.get_not_def_character ());
-		//glyphs.append (font.get_null_character ());
-		//glyphs.append (font.get_nonmarking_return ());
+		glyphs.append (font.get_null_character ());
+		glyphs.append (font.get_nonmarking_return ());
 		glyphs.append (font.get_space ());
 		
 		List<Glyph> unassigned_glyphs = new List<Glyph> ();
@@ -1585,7 +1585,7 @@ class GlyfTable : Table { 		for (indice = 0; (gl = font.get_glyph_indice (indice)) != null; indice++) {		
 			g = (!) gl;
 			
-			if (g.name == ".notdef" || g.unichar_code == 0 || g.name == "space" || g.unichar_code == 0x0020) {
+			if (g.name == ".notdef" || g.unichar_code == '\0' ||  g.unichar_code == '\r' || g.name == "space" || g.unichar_code == 0x0020 || g.name == "" || g.name == ".null" || g.unichar_code == 0 || g.name == "nonmarkingreturn") {
 				continue;
 			}
 			

Contact

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