diff --git a/src/locales/en.json b/src/locales/en.json index b9c8cb74e..116f21690 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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", diff --git a/src/static/css/pad.css b/src/static/css/pad.css index 397e61eea..cabde7ef2 100644 --- a/src/static/css/pad.css +++ b/src/static/css/pad.css @@ -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"); diff --git a/src/static/font/Montserrat-Light.otf b/src/static/font/Montserrat-Light.otf new file mode 100755 index 000000000..f2f0e2df0 Binary files /dev/null and b/src/static/font/Montserrat-Light.otf differ diff --git a/src/static/font/Montserrat-Regular.otf b/src/static/font/Montserrat-Regular.otf new file mode 100755 index 000000000..f61d57ec1 Binary files /dev/null and b/src/static/font/Montserrat-Regular.otf differ diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 392a657ea..32be03d6a 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -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){ diff --git a/src/static/js/pad_editor.js b/src/static/js/pad_editor.js index a1a901cb9..0b282659d 100644 --- a/src/static/js/pad_editor.js +++ b/src/static/js/pad_editor.js @@ -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"); diff --git a/src/templates/pad.html b/src/templates/pad.html index ae5adc05f..9a9c6f07e 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -161,6 +161,7 @@