Clone in a terminal:
Commit 7af77e0
Johan Mattsson - 2014-11-26T12:42:47+00:00
7af77e095474a053f020cac3c531e6b57d89a461johan.mattsson.m@gmail.com

Build on Windows

Changed files (3)

Diff

diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex fe5321b..30092e3 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -97,7 +97,28 @@ public class Glyph : FontDisplay { 	 	/** Cache for Cairo rendering */ 	-	HashMap<int64?, Surface> glyph_cache = new HashMap<int64?, Surface> ((Gee.HashDataFunc<int64?>) hash_int64,  (Gee.EqualDataFunc<int64?>) equal_int64);+	HashMap<int64?, Surface> glyph_cache = new HashMap<int64?, Surface> ((v) => {+		int? t = (int?) v;+		int i = (!) t;+		+		if (i == 0) {+			return 0;+		}+		+		return (int) (0xFFFFFFFF & i);+	},  (a, b) => {+		int64? i1;+		int64? i2;+		+		i1 = (int64?) a;+		i2 = (int64?) b;+		+		if (i1 == null || i1 == null) {+			return false;+		}+		+		return (!) i1 == (!) i2;+	});  	public Glyph (string name, unichar unichar_code = 0) { 		this.name = name;@@ -2090,23 +2111,6 @@ public class Glyph : FontDisplay { 		 		return glyph_cache.get (font_size); 	}-	-	public static bool equal_int64 (int64? i1, int64? i2) {-		if (i1 == null || i1 == null) {-			return false;-		}-		-		return (!) i1 == (!) i2;-	}--	public static int hash_int64 (int64? i) {-		if (i == 0) {-			return 0;-		}-		-		return (int) (0xFFFFFFFF & i);-	}- }  }diff --git a/libbirdfont/Renderer/TextArea.vala b/libbirdfont/Renderer/TextArea.valaindex 8e487da..1bcf42a 100644--- a/libbirdfont/Renderer/TextArea.vala+++ b/libbirdfont/Renderer/TextArea.vala@@ -1274,13 +1274,13 @@ public class TextArea : Widget { 			i.deleted.sort ((a, b) => { 				Paragraph pa = (Paragraph) a; 				Paragraph pb = (Paragraph) b;-				return b.index - a.index;+				return pb.index - pa.index; 			});  			i.added.sort ((a, b) => { 				Paragraph pa = (Paragraph) a; 				Paragraph pb = (Paragraph) b;-				return a.index - b.index;+				return pa.index - pb.index; 			});  			foreach (Paragraph p in i.deleted) {@@ -1334,13 +1334,13 @@ public class TextArea : Widget { 			i.deleted.sort ((a, b) => { 				Paragraph pa = (Paragraph) a; 				Paragraph pb = (Paragraph) b;-				return a.index - b.index;+				return pa.index - pb.index; 			});  			i.added.sort ((a, b) => { 				Paragraph pa = (Paragraph) a; 				Paragraph pb = (Paragraph) b;-				return b.index - a.index;+				return pb.index - pa.index; 			}); 			 			foreach (Paragraph p in i.added) {diff --git a/scripts/windows_build.py b/scripts/windows_build.pyindex 829fe8f..64abb61 100644--- a/scripts/windows_build.py+++ b/scripts/windows_build.py@@ -35,5 +35,7 @@ run("windres ./resources/win32/icon.rc -O coff -o ./build/icon.res") build.libbirdxml(prefix, cc, cflags, library_ldflags, valac, valaflags, "libbirdxml.dll") build.libbirdfont(prefix, cc, cflags, library_ldflags, valac, valaflags, "libbirdfont.dll") build.birdfont_export(prefix, cc, cflags, ldflags, valac, valaflags)+build.birdfont_import(prefix, cc, cflags, ldflags, valac, valaflags)+build.birdfont_autotrace(prefix, cc, cflags, ldflags, valac, valaflags)  print ("Done")

Contact

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