Clone in a terminal:
Commit 1ef9d71
Johan Mattsson - 2015-12-20T08:49:46+00:00
1ef9d7150d28f4a1e5946a1245a98095f7068e77johan.mattsson.m@gmail.com

Substitutions for space character

Changed files (3)

Diff

diff --git a/libbirdfont/GlyphSequence.vala b/libbirdfont/GlyphSequence.valaindex e1637d8..58a6333 100644--- a/libbirdfont/GlyphSequence.vala+++ b/libbirdfont/GlyphSequence.vala@@ -100,7 +100,16 @@ public class GlyphSequence : GLib.Object {  			foreach (Alternate a in alternates) { 				GlyphSequence old = new GlyphSequence ();-				Glyph? g = font.get_glyph_by_name (a.glyph_name);+				string name;+				Glyph? g;+				+				name = a.glyph_name;+				+				if (name == "space") {+					name = " ";+				}+				+				g = font.get_glyph_by_name (name);  				if (g != null) { 					old.add (g);diff --git a/libbirdfont/Ligatures.vala b/libbirdfont/Ligatures.valaindex 3f1516e..296e647 100644--- a/libbirdfont/Ligatures.vala+++ b/libbirdfont/Ligatures.vala@@ -58,6 +58,10 @@ public class Ligatures : GLib.Object { 			 			lig = new GlyphSequence (); 			foreach (string n in font.get_names (ligature)) {+				if (n == "space") {+					n = " ";+				}+				 				gc = font.get_glyph_collection_by_name (n); 				 				if (gc == null) {@@ -69,6 +73,10 @@ public class Ligatures : GLib.Object { 			 			gs = new GlyphSequence (); 			foreach (string s in subst_names) {+				if (s == "space") {+					s = " ";+				}+				 				gc = font.get_glyph_collection_by_name (s); 				 				if (gc == null) {diff --git a/libbirdfont/OpenFontFormat/ContextualLigature.vala b/libbirdfont/OpenFontFormat/ContextualLigature.valaindex 8719b3e..d2959a2 100644--- a/libbirdfont/OpenFontFormat/ContextualLigature.vala+++ b/libbirdfont/OpenFontFormat/ContextualLigature.vala@@ -169,6 +169,11 @@ public class ContextualLigature : GLib.Object { 		 		gs = new GlyphSequence (); 		foreach (string s in font.get_names (context)) {+			+			if (s == "space") {+				s = " ";+			}+			 			gc = font.get_glyph_collection_by_name (s); 			 			if (gc == null) {

Contact

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