From c0f5b92e3d771822ed2eb89563e2dac0ccffded5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20Gro=C3=9Fmann?= Date: Wed, 1 Jul 2015 10:42:33 +0200 Subject: [PATCH 1/2] Added CSS fallback fonts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’m not sure if this is the correct and only place where to change this. I just gave the present fonts some fallbacks (when possible) but didn’t add, remove or merge fonts. --- src/static/js/pad_editor.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/static/js/pad_editor.js b/src/static/js/pad_editor.js index 2514cd126..dd1f798eb 100644 --- a/src/static/js/pad_editor.js +++ b/src/static/js/pad_editor.js @@ -160,23 +160,23 @@ var padeditor = (function() font = font.replace("use",""); font = font.replace("Font",""); font = font.toLowerCase(); - if(font === "monospace") self.ace.setProperty("textface", "Courier new"); + if(font === "monospace") self.ace.setProperty("textface", "monospace"); if(font === "opendyslexic") self.ace.setProperty("textface", "OpenDyslexic"); - if(font === "comicsans") self.ace.setProperty("textface", "Comic Sans MS"); - if(font === "georgia") self.ace.setProperty("textface", "Georgia"); - if(font === "impact") self.ace.setProperty("textface", "Impact"); - if(font === "lucida") self.ace.setProperty("textface", "Lucida"); - if(font === "lucidasans") self.ace.setProperty("textface", "Lucida Sans Unicode"); - if(font === "palatino") self.ace.setProperty("textface", "Palatino Linotype"); - if(font === "tahoma") self.ace.setProperty("textface", "Tahoma"); - if(font === "timesnewroman") self.ace.setProperty("textface", "Times New Roman"); - if(font === "trebuchet") self.ace.setProperty("textface", "Trebuchet MS"); - if(font === "verdana") self.ace.setProperty("textface", "Verdana"); + if(font === "comicsans") self.ace.setProperty("textface", "'Comic Sans MS','Comic Sans',cursive"); + if(font === "georgia") self.ace.setProperty("textface", "Georgia,'Bitstream Charter',serif"); + if(font === "impact") self.ace.setProperty("textface", "Impact,Haettenschweiler,'Arial Black',sans-serif"); + if(font === "lucida") self.ace.setProperty("textface", "Lucida,'Lucida Serif','Lucida Bright',serif"); + if(font === "lucidasans") self.ace.setProperty("textface", "'Lucida Sans','Lucida Grande','Lucida Sans Unicode','Luxi Sans',sans-serif"); + if(font === "palatino") self.ace.setProperty("textface", "Palatino,'Palatino Linotype','URW Palladio L',Georgia,serif"); + if(font === "tahoma") self.ace.setProperty("textface", "Tahoma,sans-serif"); + if(font === "timesnewroman") self.ace.setProperty("textface", "'Times New Roman',Times,serif"); + if(font === "trebuchet") self.ace.setProperty("textface", "'Trebuchet MS',sans-serif"); + if(font === "verdana") self.ace.setProperty("textface", "Verdana,'DejaVu Sans',sans-serif"); if(font === "symbol") self.ace.setProperty("textface", "Symbol"); if(font === "webdings") self.ace.setProperty("textface", "Webdings"); if(font === "wingdings") self.ace.setProperty("textface", "Wingdings"); - if(font === "sansserif") self.ace.setProperty("textface", "MS Sans Serif"); - if(font === "serif") self.ace.setProperty("textface", "MS Serif"); + if(font === "sansserif") self.ace.setProperty("textface", "sans-serif"); + if(font === "serif") self.ace.setProperty("textface", "serif"); // $("#viewfontmenu").val(font); normalFont = false; From 7c0f3a6826c0b865f63e180e60eb03e2ab032071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20Gro=C3=9Fmann?= Date: Wed, 1 Jul 2015 12:13:37 +0200 Subject: [PATCH 2/2] Added Helvetica Neue to the Normal font --- src/static/js/pad_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/pad_editor.js b/src/static/js/pad_editor.js index dd1f798eb..6616ebe88 100644 --- a/src/static/js/pad_editor.js +++ b/src/static/js/pad_editor.js @@ -185,7 +185,7 @@ var padeditor = (function() // No font has been previously selected so use the Normal font if(normalFont){ - self.ace.setProperty("textface", "Arial, sans-serif"); + self.ace.setProperty("textface", "'Helvetica Neue',Arial, sans-serif"); // $("#viewfontmenu").val("normal"); }