Clone in a terminal:
Commit c3304e5
Johan Mattsson - 2012-09-09T18:44:02+00:00
c3304e59c310b073e15fda3d5341d61f5e4491c4johan.mattsson.m@gmail.com

remove some javascript callbacks

Changed files (5)

Diff

diff --git a/layout/supplement.js b/layout/supplement.jsindex a0a85cd..91e5aa9 100644--- a/layout/supplement.js+++ b/layout/supplement.js@@ -4,26 +4,6 @@ function call (command) { }  function update_export_settings () {--	var mess = 'export_svg:';-	-	var cb = document.getElementById('svg');-	-	if(cb.checked) {-		mess += 'true';-	} else {-		mess += 'false';-	}-	call (mess);-			-	mess = 'export_ttf:';			-	if(document.getElementById('ttf').checked) {-		mess += 'true';-	} else {-		mess += 'false';-	}-	call (mess);- 	mess = 'export_name:'; 	mess += document.getElementById('fontname').value; 	call (mess);diff --git a/src/ExportTool.vala b/src/ExportTool.valaindex e12f61d..6874e3c 100644--- a/src/ExportTool.vala+++ b/src/ExportTool.vala@@ -209,13 +209,16 @@ os.put_string ( 		@font-face { 			font-family: '"""); os.put_string (@"$(name)");              os.put_string ("""TTF'; 			src: url('""");     os.put_string (@"$(name).ttf"); os.put_string ("""') format('truetype');-		} """);+		} +		""");  	os.put_string (""" 		@font-face { 			font-family: '"""); os.put_string (@"$(name)");              os.put_string ("""EOT'; 			src: url('""");     os.put_string (@"$(name).eot"); os.put_string ("""');-		} """);+		} +		+		"""); 		 	os.put_string ("""	 		h1 {@@ -446,7 +449,7 @@ os.put_string ( 			return false; 		} 		-		status (@"Wrote $file_name");+		status (@"Wrote font files"); 		return true; 	} diff --git a/src/KeyBindings.vala b/src/KeyBindings.valaindex 9b6789b..11b72ad 100644--- a/src/KeyBindings.vala+++ b/src/KeyBindings.vala@@ -99,7 +99,8 @@ class BindingList { 				new NewFile (), 				new Load (), 				new ShowKerningContext (),-				new ShowPreview ()+				new ShowPreview (),+				new ExportFonts () 			};  			nc = default_bindings;diff --git a/src/MenuTab.vala b/src/MenuTab.valaindex 782e063..895eaf0 100644--- a/src/MenuTab.vala+++ b/src/MenuTab.vala@@ -26,18 +26,6 @@ class MenuTab : FontDisplay {  	public MenuTab () { 		// html callbacks:-		add_html_callback ("export_svg", (val) => {-			Font f = Supplement.get_current_font ();-			f.set_svg_export (bool.parse (val));-			f.touch ();-		});-		-		add_html_callback ("export_ttf", (val) => {-			Font f = Supplement.get_current_font ();-			f.set_ttf_export (bool.parse (val));-			f.touch ();-		});- 		add_html_callback ("export_name", (val) => { 			Font f = Supplement.get_current_font (); 			f.set_name (val);@@ -53,7 +41,6 @@ class MenuTab : FontDisplay { 		});		  		add_html_callback ("load", (val) => {-			print (@"Load: $val\n"); 			load_font (val); 		});	 diff --git a/src/Preview.vala b/src/Preview.valaindex f62a9ba..13bf9d1 100644--- a/src/Preview.vala+++ b/src/Preview.vala@@ -37,15 +37,16 @@ class Preview : FontDisplay { 		string uri = get_uri (); 		File new_dest; -		ExportTool.export_svg_font ();+		// ExportTool.export_svg_font (); windows requires all fonts to be available+		ExportTool.export_all (); 		 		w.open (uri); 		w.reload_bypass_cache (); -		// this is a hack forces webkit to reload the font and ignore cached data+		// this  hack forces webkit to reload the font and ignore cached data 		// it's only required on windows platform and in wine  		//-		// it would be nice to get remove it.+		// it would be nice to remove it. 		if (Supplement.win32) { 			TimeoutSource t1 = new TimeoutSource (300); 			t1.set_callback (() => {

Contact

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