Clone in a terminal:
Commit 6265761
Johan Mattsson - 2015-08-29T12:52:54+00:00
6265761469029fbdfdaa8925aa890600ecab7bedjohan.mattsson.m@gmail.com

Fix spacing classes Always copy side bearings from the first glyph to the next glyph (never the other way around) when new spacing classes are added to a font.

Changed files (1)

Diff

diff --git a/libbirdfont/SpacingData.vala b/libbirdfont/SpacingData.valaindex 8c948ab..69ea089 100644--- a/libbirdfont/SpacingData.vala+++ b/libbirdfont/SpacingData.vala@@ -99,22 +99,22 @@ public class SpacingData : GLib.Object { 		GlyphCollection? g; 		GlyphCollection gc; 		-		if (s.next != "?") {-			kerning_classes.update_space_class (s.next);-			g = font.get_glyph_collection (s.next);-			if (g != null) {-				gc = (!) g;-				gc.get_current ().update_spacing_class ();-			}+		if (s.next == "?" || s.first == "?") {+			return; 		}-		-		if (s.first != "?") {-			kerning_classes.update_space_class (s.first);-			g = font.get_glyph_collection (s.first);-			if (g != null) {-				gc = (!) g;-				gc.get_current ().update_spacing_class ();-			}++		kerning_classes.update_space_class (s.next);+		g = font.get_glyph_collection (s.next);+		if (g != null) {+			gc = (!) g;+			gc.get_current ().update_spacing_class ();+		}++		kerning_classes.update_space_class (s.first);+		g = font.get_glyph_collection (s.first);+		if (g != null) {+			gc = (!) g;+			gc.get_current ().update_spacing_class (); 		} 		 		KerningTools.update_spacing_classes ();

Contact

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