Clone in a terminal:
Commit b5c9163
Johan Mattsson - 2012-10-25T19:50:12+00:00
b5c91635fe034ab12ca2e5d1830ad41cbc82b4a5johan.mattsson.m@gmail.com

platform specific preview

Changed files (4)

Diff

diff --git a/src/EotWriter.vala b/src/EotWriter.valaindex 0bc0736..2f32e05 100644--- a/src/EotWriter.vala+++ b/src/EotWriter.vala@@ -19,7 +19,7 @@ using Math;  namespace Supplement { -class EotWriter {+class EotWriter : GLib.Object { 	 	string ttf_file_name; 	string eot_file_name;diff --git a/src/ExportTool.vala b/src/ExportTool.valaindex 9ac4fa6..c8921c7 100644--- a/src/ExportTool.vala+++ b/src/ExportTool.vala@@ -364,9 +364,6 @@ os.put_string ( 			async = false; 		} -		// the font be created before html is loaded into webkit, see the hack in GtkWindow-		async = false;- 		try { 			// create a copy of current font and use it in a separate  			// export thread@@ -448,11 +445,10 @@ os.put_string ( 		return true; 	} - 	public class ExportThread : GLib.Object {-		private string ffi;-		private string ttf;-		private string eot;+		private static string ffi;+		private static string ttf;+		private static string eot;  		public ExportThread (string ffi, string ttf, string eot) { 			this.ffi = ffi.dup ();@@ -501,7 +497,7 @@ os.put_string ( 		} 		 		void write_eof () {-/*			EotWriter fo;+			EotWriter fo;  			return_if_fail (!is_null (this)); 			return_if_fail (!is_null (ttf));@@ -510,14 +506,15 @@ os.put_string ( 			fo = new EotWriter (ttf, eot);  			return_if_fail (!is_null (fo));-			+ 			try { 				fo.write (); 			} catch (Error e) { 				warning ("EOF convertion falied."); 				critical (@"$(e.message)");-			}*/+			} 		}+ 	} 	 	private static void status (string s) {diff --git a/src/GtkWindow.vala b/src/GtkWindow.valaindex e829ea6..e354ff7 100644--- a/src/GtkWindow.vala+++ b/src/GtkWindow.vala@@ -92,13 +92,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { 				if (fd.get_html () == "") { 					 					if (fd.get_name () == "Preview") {-						// hack: force webkit to ignore cache in preview-						//ExportTool.export_all ();--						html_canvas.reload_bypass_cache ();-						html_canvas.load_html_string ("<html></html>", "file:///");	-						html_canvas.reload_bypass_cache ();-						+						// hack: force webkit to ignore cache in preview					 						html_box.set_visible (false); 						glyph_canvas_area.set_visible (true); 												@@ -116,24 +110,28 @@ public class GtkWindow : Gtk.Window, NativeWindow { 							File f_eot = font.get_folder ().get_child (@"$(font.get_name ()).eot"); 							File f_svg = font.get_folder ().get_child (@"$(font.get_name ()).svg"); -							if (f_ttf.query_exists ())+							if (f_ttf.query_exists ()) { 								f_ttf.delete ();+							} 								-							if (f_eot.query_exists ())+							if (f_eot.query_exists ()) { 								f_eot.delete ();-								-							if (f_svg.query_exists ())+							}+							+							if (f_svg.query_exists ()) { 								f_svg.delete ();--							ExportTool.export_ttf_font ();+							}+							+							ExportTool.export_ttf_font ();							 							ExportTool.export_svg_font (); 							 							File r_ttf = preview_directory.get_child (@"$(font.get_name ())$rid.ttf");-							//File r_eot = preview_directory.get_child (@"$(font.get_name ())$rid.eot"); 							File r_svg = preview_directory.get_child (@"$(font.get_name ())$rid.svg"); 							-							f_ttf.copy (r_ttf, FileCopyFlags.NONE);-							//f_eot.copy (r_eot, FileCopyFlags.NONE);+							if (Supplement.win32) {+								f_ttf.copy (r_ttf, FileCopyFlags.NONE);+							}+							 							f_svg.copy (r_svg, FileCopyFlags.NONE);  							while ((line = dis.read_line (null)) != null) {diff --git a/win32/birdfont.ico b/win32/birdfont.icoindex 7f0549f..968d137 100644Binary files a/win32/birdfont.ico and b/win32/birdfont.ico differ

Contact

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