From 599a94fc9a848f63dae2fc0623d6f446a993d6ed Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 12 Sep 2024 16:37:27 +0200 Subject: fix(a11y): Update OpenDyslexic from 0.920 to 2.001 Signed-off-by: Joas Schilling --- apps/theming/fonts/OpenDyslexic-Bold.otf | Bin 230716 -> 42408 bytes apps/theming/fonts/OpenDyslexic-Bold.ttf | Bin 311772 -> 0 bytes apps/theming/fonts/OpenDyslexic-Bold.woff | Bin 135076 -> 0 bytes apps/theming/fonts/OpenDyslexic-Regular.otf | Bin 215772 -> 41088 bytes apps/theming/fonts/OpenDyslexic-Regular.ttf | Bin 308524 -> 0 bytes apps/theming/fonts/OpenDyslexic-Regular.woff | Bin 128784 -> 0 bytes apps/theming/lib/Themes/DyslexiaFont.php | 14 +++----------- 7 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 apps/theming/fonts/OpenDyslexic-Bold.ttf delete mode 100644 apps/theming/fonts/OpenDyslexic-Bold.woff delete mode 100644 apps/theming/fonts/OpenDyslexic-Regular.ttf delete mode 100644 apps/theming/fonts/OpenDyslexic-Regular.woff (limited to 'apps/theming') diff --git a/apps/theming/fonts/OpenDyslexic-Bold.otf b/apps/theming/fonts/OpenDyslexic-Bold.otf index 7d074cbddee..4c492e2fcc2 100644 Binary files a/apps/theming/fonts/OpenDyslexic-Bold.otf and b/apps/theming/fonts/OpenDyslexic-Bold.otf differ diff --git a/apps/theming/fonts/OpenDyslexic-Bold.ttf b/apps/theming/fonts/OpenDyslexic-Bold.ttf deleted file mode 100644 index 25cf37f99e2..00000000000 Binary files a/apps/theming/fonts/OpenDyslexic-Bold.ttf and /dev/null differ diff --git a/apps/theming/fonts/OpenDyslexic-Bold.woff b/apps/theming/fonts/OpenDyslexic-Bold.woff deleted file mode 100644 index 41886ae9dda..00000000000 Binary files a/apps/theming/fonts/OpenDyslexic-Bold.woff and /dev/null differ diff --git a/apps/theming/fonts/OpenDyslexic-Regular.otf b/apps/theming/fonts/OpenDyslexic-Regular.otf index ebef13c4ce3..1226d2ab281 100644 Binary files a/apps/theming/fonts/OpenDyslexic-Regular.otf and b/apps/theming/fonts/OpenDyslexic-Regular.otf differ diff --git a/apps/theming/fonts/OpenDyslexic-Regular.ttf b/apps/theming/fonts/OpenDyslexic-Regular.ttf deleted file mode 100644 index 4b0cb8c46b7..00000000000 Binary files a/apps/theming/fonts/OpenDyslexic-Regular.ttf and /dev/null differ diff --git a/apps/theming/fonts/OpenDyslexic-Regular.woff b/apps/theming/fonts/OpenDyslexic-Regular.woff deleted file mode 100644 index 26a2934d640..00000000000 Binary files a/apps/theming/fonts/OpenDyslexic-Regular.woff and /dev/null differ diff --git a/apps/theming/lib/Themes/DyslexiaFont.php b/apps/theming/lib/Themes/DyslexiaFont.php index 2552fc65724..2448de7b3c8 100644 --- a/apps/theming/lib/Themes/DyslexiaFont.php +++ b/apps/theming/lib/Themes/DyslexiaFont.php @@ -43,30 +43,22 @@ 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('$fontPathWoff') format('woff'), - url('$fontPathOtf') format('opentype'), - url('$fontPathTtf') format('truetype'); + src: url('$fontPathOtf') format('opentype'); } - + @font-face { font-family: 'OpenDyslexic'; font-style: normal; font-weight: 700; - src: url('$boldFontPathWoff') format('woff'), - url('$boldFontPathOtf') format('opentype'), - url('$boldFontPathTtf') format('truetype'); + src: url('$boldFontPathOtf') format('opentype'); } "; } -- cgit v1.2.3 From 0c224393f500bfbdb74901832f41ed16f8d28e7c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 12 Sep 2024 23:04:16 +0200 Subject: fix(tests): Test OTF font file Signed-off-by: Joas Schilling --- apps/theming/tests/Themes/DyslexiaFontTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/theming') diff --git a/apps/theming/tests/Themes/DyslexiaFontTest.php b/apps/theming/tests/Themes/DyslexiaFontTest.php index 05f489449b8..99b6f8cfc8e 100644 --- a/apps/theming/tests/Themes/DyslexiaFontTest.php +++ b/apps/theming/tests/Themes/DyslexiaFontTest.php @@ -163,7 +163,7 @@ class DyslexiaFontTest extends TestCase { ->with('htaccess.IgnoreFrontController', false) ->willReturn($prettyUrlsEnabled); - $this->assertStringContainsString("'$webRoot/apps/theming/fonts/OpenDyslexic-Regular.woff'", $this->dyslexiaFont->getCustomCss()); + $this->assertStringContainsString("'$webRoot/apps/theming/fonts/OpenDyslexic-Regular.otf'", $this->dyslexiaFont->getCustomCss()); $this->assertStringNotContainsString('index.php', $this->dyslexiaFont->getCustomCss()); } } -- cgit v1.2.3