Clone in a terminal:
Commit edab9da
Johan Mattsson - 2016-06-30T11:46:28+00:00
edab9dac1a67551ef70b74c54776994e2b2d1a6fjohan.mattsson.m@gmail.com

Add default characters if they are not present in font

Changed files (1)

Diff

diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex b0b5e85..95caa9d 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -188,8 +188,19 @@ public class Font : GLib.Object { 	}  	public void add_default_characters () {-		add_glyph_collection (get_notdef_character ());-		add_glyph_collection (get_space ());+		GlyphCollection notdef, space;+		+		notdef = get_notdef_character ();+		+		if (!has_glyph (notdef.get_name ()) {+			add_glyph_collection (notdef);+		}+		+		space = get_space ();+		+		if (!has_glyph (space.get_name ()) {+			add_glyph_collection (space);+		} 	} 	 	public Alternate? get_alternate (string glyph_name, string tag) {

Contact

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