Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-22 13:59:11 +0300
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-22 14:04:15 +0300
commitf7f4d36a372a7eb97debb0c2fd08615c754bd260 (patch)
tree5c5c2e8ab554865b73cc88cd17e6b9e70f2736a1 /apps/theming/lib
parent9a76f06ecadf05ef1d26bd735df1bea0dfb15d59 (diff)
Fix dyslexia font loading
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Themes/DyslexiaFont.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/apps/theming/lib/Themes/DyslexiaFont.php b/apps/theming/lib/Themes/DyslexiaFont.php
index 50284d33b9d..2629ac588c6 100644
--- a/apps/theming/lib/Themes/DyslexiaFont.php
+++ b/apps/theming/lib/Themes/DyslexiaFont.php
@@ -60,23 +60,30 @@ class DyslexiaFont extends DefaultTheme implements ITheme {
}
public function getCustomCss(): string {
+ $fontPathWoff = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.woff');
+ $fontPathOtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.otf');
+ $fontPathTtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.ttf');
+ $boldFontPathWoff = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Bold.woff');
+ $boldFontPathOtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Bold.otf');
+ $boldFontPathTtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Bold.ttf');
+
return "
@font-face {
font-family: 'OpenDyslexic';
font-style: normal;
font-weight: 400;
- src: url('../fonts/OpenDyslexic-Regular.woff') format('woff'),
- url('../fonts/OpenDyslexic-Regular.otf') format('opentype'),
- url('../fonts/OpenDyslexic-Regular.ttf') format('truetype');
+ src: url('$fontPathWoff') format('woff'),
+ url('$fontPathOtf') format('opentype'),
+ url('$fontPathTtf') format('truetype');
}
@font-face {
font-family: 'OpenDyslexic';
font-style: normal;
font-weight: 700;
- src: url('../fonts/OpenDyslexic-Bold.woff') format('woff'),
- url('../fonts/OpenDyslexic-Bold.otf') format('opentype'),
- url('../fonts/OpenDyslexic-Bold.ttf') format('truetype');
+ src: url('$boldFontPathWoff') format('woff'),
+ url('$boldFontPathOtf') format('opentype'),
+ url('$boldFontPathTtf') format('truetype');
}
";
}