font picker: improve the font picker (closes #3451)

Preparatory work for introducing colibris skin
This commit is contained in:
Sebastian Castro 2018-11-08 21:56:10 +01:00
parent c5a07e6827
commit 63ec2d8cc2
3 changed files with 45 additions and 84 deletions

View file

@ -166,25 +166,27 @@ function handleClientVars(message)
// font family change
$("#viewfontmenu").change(function(){
var font = $("#viewfontmenu").val();
if(font === "monospace") setFont("Courier new");
if(font === "opendyslexic") setFont("OpenDyslexic");
if(font === "comicsans") setFont("Comic Sans MS");
if(font === "georgia") setFont("Georgia");
if(font === "impact") setFont("Impact");
if(font === "lucida") setFont("Lucida");
if(font === "lucidasans") setFont("Lucida Sans Unicode");
if(font === "palatino") setFont("Palatino Linotype");
if(font === "tahoma") setFont("Tahoma");
if(font === "timesnewroman") setFont("Times New Roman");
if(font === "trebuchet") setFont("Trebuchet MS");
if(font === "verdana") setFont("Verdana");
if(font === "symbol") setFont("Symbol");
if(font === "webdings") setFont("Webdings");
if(font === "wingdings") setFont("Wingdings");
if(font === "sansserif") setFont("MS Sans Serif");
if(font === "serif") setFont("MS Serif");
switch (font) {
case "monospace": setFont("Courier new");break;
case "opendyslexic": setFont("OpenDyslexic");break;
case "comicsans": setFont("Comic Sans MS");break;
case "georgia": setFont("Georgia");break;
case "impact": setFont("Impact");break;
case "lucida": setFont("Lucida");break;
case "lucidasans": setFont("Lucida Sans Unicode");break;
case "palatino": setFont("Palatino Linotype");break;
case "tahoma": setFont("Tahoma");break;
case "timesnewroman": setFont("Times New Roman");break;
case "trebuchet": setFont("Trebuchet MS");break;
case "verdana": setFont("Verdana");break;
case "symbol": setFont("Symbol");break;
case "webdings": setFont("Webdings");break;
case "wingdings": setFont("Wingdings");break;
case "sansserif": setFont("MS Sans Serif");break;
case "serif": setFont("MS Serif");break;
default: setFont("");break;
}
});
}
function setFont(font){