Added support for the Montserrat Font as discussed in #3201 (#3205)

* Added support for the Montserrat Font as discussed in #3201

I chose a thin version of the Font (namely Montserrat Light) as the regular font and Montserrat Regular as the bold version. The thin fonts just look better in my opinion.
pull/3227/head
Jan Holub 2017-07-12 17:21:48 +02:00 committed by Luiza Pagliari
parent 8c57c8d0d6
commit 8bd8be97b9
7 changed files with 30 additions and 8 deletions

View File

@ -40,6 +40,7 @@
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.opendyslexic": "Open Dyslexic",
"pad.settings.fontType.monospaced": "Monospace",
"pad.settings.fontType.montserrat": "Montserrat",
"pad.settings.fontType.comicsans": "Comic Sans",
"pad.settings.fontType.couriernew": "Courier New",
"pad.settings.fontType.georgia": "Georgia",

View File

@ -1272,6 +1272,21 @@ input[type=checkbox] {
}
/* End of gritter stuff */
/* Montserrat Font */
@font-face {
font-family: "Montserrat";
src: url("../../static/font/Montserrat-Light.otf") format("opentype");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Montserrat";
src: url("../../static/font/Montserrat-Regular.otf") format("opentype");
font-weight: bold;
font-style: normal;
}
/* End of Monterrat Font */
@font-face {
font-family: opendyslexic;
src: url("../../static/font/opendyslexic.otf") format("opentype");

Binary file not shown.

Binary file not shown.

View File

@ -554,10 +554,12 @@ var pad = {
pad.changeViewOption('rtlIsTrue', true);
}
var fonts = ['useMonospaceFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont', 'useGeorgiaFont', 'useImpactFont',
'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont', 'useTahomaFont', 'useTimesNewRomanFont',
'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont', 'useWingDingsFont', 'useSansSerifFont',
'useSerifFont'];
var fonts = ['useMonospaceFont', 'useMontserratFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont',
'useGeorgiaFont', 'useImpactFont', 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont',
'useTahomaFont', 'useTimesNewRomanFont', 'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont',
'useWingDingsFont', 'useSansSerifFont', 'useSerifFont'];
$.each(fonts, function(i, font){
if(padcookie.getPref(font) == true){

View File

@ -30,10 +30,12 @@ var padeditor = (function()
var settings = undefined;
// Array of available fonts
var fonts = ['useMonospaceFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont', 'useGeorgiaFont', 'useImpactFont',
'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont', 'useTahomaFont', 'useTimesNewRomanFont',
'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont', 'useWingDingsFont', 'useSansSerifFont',
'useSerifFont'];
var fonts = ['useMonospaceFont', 'useMontserratFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont',
'useGeorgiaFont', 'useImpactFont', 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont',
'useTahomaFont', 'useTimesNewRomanFont', 'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont',
'useWingDingsFont', 'useSansSerifFont', 'useSerifFont'];
var self = {
ace: null,
@ -161,6 +163,7 @@ var padeditor = (function()
font = font.replace("Font","");
font = font.toLowerCase();
if(font === "monospace") self.ace.setProperty("textface", "monospace");
if(font === "montserrat") self.ace.setProperty("textface", "Montserrat");
if(font === "opendyslexic") self.ace.setProperty("textface", "OpenDyslexic");
if(font === "comicsans") self.ace.setProperty("textface", "'Comic Sans MS','Comic Sans',cursive");
if(font === "georgia") self.ace.setProperty("textface", "Georgia,'Bitstream Charter',serif");

View File

@ -161,6 +161,7 @@
<select id="viewfontmenu">
<option value="normal" data-l10n-id="pad.settings.fontType.normal"></option>
<option value="monospace" data-l10n-id="pad.settings.fontType.monospaced"></option>
<option value="montserrat" data-l10n-id="pad.settings.fontType.montserrat"></option>
<option value="opendyslexic" data-l10n-id="pad.settings.fontType.opendyslexic"></option>
<option value="comicsans" data-l10n-id="pad.settings.fontType.comicsans"></option>
<option value="georgia" data-l10n-id="pad.settings.fontType.georgia"></option>