summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiza Pagliari <lpagliari@gmail.com>2017-07-12 08:02:09 -0300
committerGitHub <noreply@github.com>2017-07-12 08:02:08 -0300
commit8c57c8d0d67ccba8500980d89f95cc011468116d (patch)
tree3798256f025196cb0dc0d4a9ab1903f9e60a52ef
parent3e5d71ad5ad0ac77fe9760d4f8e8a9101d0d2f7d (diff)
parent7029248a76a590e2f130bde71fe2bbfb2c032bbb (diff)
downloadetherpad-lite-8c57c8d0d67ccba8500980d89f95cc011468116d.zip
Merge pull request #3206 from 00SteinsGate00/RobotoMono
Added RobotoMono as a more modern and pretty monospaced font
-rw-r--r--src/locales/en.json1
-rw-r--r--src/static/css/pad.css17
-rwxr-xr-xsrc/static/font/RobotoMono-Bold.ttfbin0 -> 114752 bytes
-rwxr-xr-xsrc/static/font/RobotoMono-Regular.ttfbin0 -> 114624 bytes
-rw-r--r--src/static/js/pad.js2
-rw-r--r--src/static/js/pad_editor.js7
-rw-r--r--src/templates/pad.html1
7 files changed, 22 insertions, 6 deletions
diff --git a/src/locales/en.json b/src/locales/en.json
index 9e0d49b3..b9c8cb74 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -47,6 +47,7 @@
"pad.settings.fontType.lucida": "Lucida",
"pad.settings.fontType.lucidasans": "Lucida Sans",
"pad.settings.fontType.palatino": "Palatino",
+ "pad.settings.fontType.robotomono": "RobotoMono",
"pad.settings.fontType.tahoma": "Tahoma",
"pad.settings.fontType.timesnewroman": "Times New Roman",
"pad.settings.fontType.trebuchet": "Trebuchet",
diff --git a/src/static/css/pad.css b/src/static/css/pad.css
index 0b881d78..397e61ee 100644
--- a/src/static/css/pad.css
+++ b/src/static/css/pad.css
@@ -1277,6 +1277,21 @@ input[type=checkbox] {
src: url("../../static/font/opendyslexic.otf") format("opentype");
}
+/* Roboto Mono */
+@font-face {
+ font-family: "RobotoMono";
+ src: url("../../static/font/RobotoMono-Regular.ttf") format("truetype");
+ font-weight: normal;
+ font-style: normal;
+}
+@font-face {
+ font-family: "RobotoMono";
+ src: url("../../static/font/RobotoMono-Bold.ttf") format("truetype");
+ font-weight: bold;
+ font-style: normal;
+}
+/* End of Roboto Mono */
+
@font-face {
font-family: "fontawesome-etherpad";
src:url("../../static/font/fontawesome-etherpad.eot");
@@ -1321,5 +1336,3 @@ input[type=checkbox] {
.hideControlsEditbar{
display:none !important;
}
-
-
diff --git a/src/static/font/RobotoMono-Bold.ttf b/src/static/font/RobotoMono-Bold.ttf
new file mode 100755
index 00000000..07ef607d
--- /dev/null
+++ b/src/static/font/RobotoMono-Bold.ttf
Binary files differ
diff --git a/src/static/font/RobotoMono-Regular.ttf b/src/static/font/RobotoMono-Regular.ttf
new file mode 100755
index 00000000..b158a334
--- /dev/null
+++ b/src/static/font/RobotoMono-Regular.ttf
Binary files differ
diff --git a/src/static/js/pad.js b/src/static/js/pad.js
index 4fefadf3..392a657e 100644
--- a/src/static/js/pad.js
+++ b/src/static/js/pad.js
@@ -555,7 +555,7 @@ var pad = {
}
var fonts = ['useMonospaceFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont', 'useGeorgiaFont', 'useImpactFont',
- 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useTahomaFont', 'useTimesNewRomanFont',
+ 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont', 'useTahomaFont', 'useTimesNewRomanFont',
'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont', 'useWingDingsFont', 'useSansSerifFont',
'useSerifFont'];
diff --git a/src/static/js/pad_editor.js b/src/static/js/pad_editor.js
index 3e6b49d3..a1a901cb 100644
--- a/src/static/js/pad_editor.js
+++ b/src/static/js/pad_editor.js
@@ -1,5 +1,5 @@
/**
- * This code is mostly from the old Etherpad. Please help us to comment this code.
+ * This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
@@ -31,7 +31,7 @@ var padeditor = (function()
// Array of available fonts
var fonts = ['useMonospaceFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont', 'useGeorgiaFont', 'useImpactFont',
- 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useTahomaFont', 'useTimesNewRomanFont',
+ 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont', 'useTahomaFont', 'useTimesNewRomanFont',
'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont', 'useWingDingsFont', 'useSansSerifFont',
'useSerifFont'];
@@ -102,7 +102,7 @@ var padeditor = (function()
pad.changeViewOption(font, $("#viewfontmenu").val() == sfont);
});
});
-
+
// Language
html10n.bind('localized', function() {
$("#languagemenu").val(html10n.getLanguage());
@@ -168,6 +168,7 @@ var padeditor = (function()
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 === "robotomono") self.ace.setProperty("textface", "RobotoMono");
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");
diff --git a/src/templates/pad.html b/src/templates/pad.html
index 7c1f1fb1..ae5adc05 100644
--- a/src/templates/pad.html
+++ b/src/templates/pad.html
@@ -168,6 +168,7 @@
<option value="lucida" data-l10n-id="pad.settings.fontType.lucida"></option>
<option value="lucidasans" data-l10n-id="pad.settings.fontType.lucidasans"></option>
<option value="palatino" data-l10n-id="pad.settings.fontType.palatino"></option>
+ <option value="robotomono" data-l10n-id="pad.settings.fontType.robotomono"></option>
<option value="tahoma" data-l10n-id="pad.settings.fontType.tahoma"></option>
<option value="timesnewroman" data-l10n-id="pad.settings.fontType.timesnewroman"></option>
<option value="trebuchet" data-l10n-id="pad.settings.fontType.trebuchet"></option>