From 4691891a175b0ec019a9eb95c859bec8363beb2a Mon Sep 17 00:00:00 2001 From: Justin Obara Date: Thu, 11 Jul 2024 08:07:21 -0400 Subject: [PATCH 1/4] FLUID-6763: add Atkinson Hyperlegible font to UIO --- .gitignore | 5 ++- README.md | 7 ++-- ReleaseNotes.md | 12 ++++-- package.json | 16 ++++---- .../overviewPanel/css/OverviewPanel.css | 30 ++++++-------- src/components/overviewPanel/package.json | 4 +- .../preferences/css/sass/Font_base.scss | 2 +- .../css/sass/SeparatedPanelPrefsEditor.scss | 25 +++-------- .../preferences/css/sass/utils/_fonts.scss | 41 +++++++++++++++---- src/framework/preferences/js/StarterGrades.js | 8 ++-- .../preferences/js/StarterSchemas.js | 11 +++-- .../preferences/messages/textFont.json | 1 + .../preferences/messages/textFont_en.json | 1 + .../preferences/messages/textFont_en_CA.json | 1 + .../preferences/messages/textFont_en_US.json | 1 + .../preferences/messages/textFont_es.json | 1 + .../preferences/messages/textFont_fa.json | 1 + .../preferences/messages/textFont_fr.json | 1 + .../preferences/messages/textFont_pt_BR.json | 1 + src/framework/preferences/package.json | 5 ++- src/lib/package.json | 16 +++++--- .../preferences/data/textFont_en.json | 1 + .../preferences/js/IntegrationTestsCommon.js | 12 +++--- .../preferences/js/PanelsTests.js | 13 +++--- .../preferences/js/PrefsEditorTests.js | 2 +- 25 files changed, 129 insertions(+), 89 deletions(-) diff --git a/.gitignore b/.gitignore index 5bcf595a63..0f540f19ae 100644 --- a/.gitignore +++ b/.gitignore @@ -4,11 +4,12 @@ /src/framework/preferences/css/*.css /src/framework/preferences/css/*.css.map /.bundle/ +/src/lib/atkinson-hyperlegible/ /src/lib/hypher/ /src/lib/jquery/ -/src/lib/open-dyslexic/ +/src/lib/opendyslexic/ /src/lib/opensans/ -/src/lib/roboto/ +/src/lib/roboto-slab/ /tests/lib/jquery-simulate/ /tests/lib/sinon/ /tests/lib/xhr-mock/ diff --git a/README.md b/README.md index da5e7eee12..2908ec1db0 100644 --- a/README.md +++ b/README.md @@ -229,15 +229,16 @@ The zip files will obliterate the contents of the `products` directory and must #### External Libraries +* @fontsource-variable/open-sans +* @fontsource-variable/roboto-slab +* @fontsource/atkinson-hyperlegible +* @fontsource/opendyslexic * fast-xml-pull * hypher * jquery * jquery-ui * jquery-scrollto * jquery-ui-touch-punch -* open-dyslexic -* opensans-webkit -* roboto-fontface ## How Do I Run Tests? diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 0adf84cee0..2db3373569 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -104,8 +104,8 @@ categorized by license: * [`fluid.load.scripts` is based on Jake Archibald's script loading example]( https://www.html5rocks.com/en/tutorials/speed/script-loading/#toc-dom-rescue) -* [Open Sans font](https://www.google.com/fonts/specimen/Open+Sans) -* [Roboto font](https://fonts.google.com/specimen/Roboto) +* [Roboto Slab](https://github.com/googlefonts/robotoslab) + * via [Fontsource](https://fontsource.org/fonts/roboto-slab) ### BSD-3 @@ -140,10 +140,14 @@ categorized by license: ### Open Font License +* [Atkinson Hyperlegible](https://brailleinstitute.org/freefont) + * via [Fontsource](https://fontsource.org/fonts/atkinson-hyperlegible) * [Lato font v2.015](http://www.latofonts.com) * [Love Ya Like A Sister font](https://fonts.google.com/specimen/Love+Ya+Like+A+Sister) -* [OpenDyslexic 3](https://opendyslexic.org/) - * via [NPM Package](https://github.com/ssbc/open-dyslexic) distributed under Bitstream license. +* [OpenDyslexic](https://opendyslexic.org/) + * via [Fontsource](https://fontsource.org/fonts/opendyslexic) +* [Open Sans font](https://github.com/googlefonts/opensans) + * via [Fontsource](https://fontsource.org/fonts/open-sans) ### zlib/libpng License diff --git a/package.json b/package.json index a73eacb91b..a6a2ffc156 100755 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "clean:build": "rimraf build products", "clean:deps": "run-p clean:deps:*", "clean:deps:code": "rimraf \"src/lib/@(hypher|jquery)\"", - "clean:deps:fonts": "rimraf \"src/lib/@(open-dyslexic|opensans|roboto)\"", + "clean:deps:fonts": "rimraf \"src/lib/@(atkinson-hyperlegible|opendyslexic|opensans|roboto-slab)\"", "clean:deps:tests": "rimraf \"tests/lib/@(simulate|sinon)\"", "clean:dist": "rimraf dist", "clean:sass": "rimraf \"src/framework/preferences/css/*.@(css|map)\"", @@ -59,9 +59,10 @@ "deps:code:jquery:touchPunch": "cpy node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js src/lib/jquery/plugins/touchPunch/js/", "predeps:fonts": "npm run clean:deps:fonts", "deps:fonts": "run-p deps:fonts:**", - "deps:fonts:openSans": "cpy node_modules/opensans-webkit/fonts/OpenSans-*.woff src/lib/opensans/fonts/", - "deps:fonts:openDyslexic": "cpy node_modules/open-dyslexic/woff/OpenDyslexic-*.woff src/lib/open-dyslexic/fonts/", - "deps:fonts:roboto": "cpy node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-*.woff src/lib/roboto/fonts/", + "deps:fonts:atkinson-hyperlegible": "cpy node_modules/@fontsource/atkinson-hyperlegible/files/atkinson-hyperlegible-latin-*.woff2 src/lib/atkinson-hyperlegible/fonts/", + "deps:fonts:openSans": "cpy node_modules/@fontsource-variable/open-sans/files/open-sans-latin-*.woff2 src/lib/opensans/fonts/", + "deps:fonts:openDyslexic": "cpy node_modules/@fontsource/opendyslexic/files/opendyslexic-latin-*.woff2 src/lib/opendyslexic/fonts/", + "deps:fonts:roboto": "cpy node_modules/@fontsource-variable/roboto-slab/files/roboto-slab-latin-*.woff2 src/lib/roboto-slab/fonts/", "predeps:tests": "npm run clean:deps:tests", "deps:tests": "run-p deps:tests:*", "deps:tests:simulate": "cpy node_modules/jquery-simulate/jquery.simulate.js tests/lib/jquery-simulate/js/", @@ -94,6 +95,10 @@ }, "devDependencies": { "@fluid-project/hyphenation-patterns": "0.2.2-dev.20181115T221631Z.b2d0651", + "@fontsource-variable/open-sans": "5.0.29", + "@fontsource-variable/roboto-slab": "5.0.20", + "@fontsource/atkinson-hyperlegible": "5.0.20", + "@fontsource/opendyslexic": "5.0.11", "bestzip": "2.2.1", "browserslist-config-fluid": "0.1.0", "cpy-cli": "3.1.1", @@ -113,10 +118,7 @@ "mkdirp": "1.0.4", "npm-run-all": "4.1.5", "nyc": "15.1.0", - "open-dyslexic": "1.0.3", - "opensans-webkit": "1.1.0", "rimraf": "3.0.2", - "roboto-fontface": "0.10.0", "sass": "1.43.4", "serve": "13.0.2", "sinon": "12.0.1", diff --git a/src/components/overviewPanel/css/OverviewPanel.css b/src/components/overviewPanel/css/OverviewPanel.css index ac429d0976..7917271d30 100644 --- a/src/components/overviewPanel/css/OverviewPanel.css +++ b/src/components/overviewPanel/css/OverviewPanel.css @@ -4,26 +4,20 @@ src: url('../fonts/OverviewPanel-Icons.woff'); } +/* open-sans-latin-wght-normal */ @font-face { - font-family: 'OpenSans'; - src: url('../../../lib/opensans/fonts/OpenSans-Regular.woff'); + font-family: 'Open Sans Variable'; + font-style: normal; + font-weight: 300 800; + src: url('../../../lib/opensans/fonts/open-sans-latin-wght-normal.woff2') format('woff2-variations'); } +/* roboto-slab-latin-wght-normal */ @font-face { - font-family: 'OpenSans'; - font-weight: bold; - src: url('../../../lib/opensans/fonts/OpenSans-Bold.woff'); -} - -@font-face { - font-family: 'RobotoSlab'; - src: url('../../../lib/roboto/fonts/Roboto-Slab-Regular.woff'); -} - -@font-face { - font-family: 'RobotoSlab'; - font-weight: bold; - src: url('../../../lib/roboto/fonts/Roboto-Slab-Bold.woff'); + font-family: 'Roboto Slab Variable'; + font-style: normal; + font-weight: 100 900; + src: url('../../../lib/roboto-slab/fonts/roboto-slab-latin-wght-normal.woff2') format('woff2-variations'); } .fl-overviewPanel-container { @@ -36,7 +30,7 @@ * direction. */ - font-family: "OpenSans", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: "Open Sans Variable", "Helvetica Neue", "Helvetica", Arial, sans-serif; font-size: 1em; height: 100%; left: 0; @@ -57,7 +51,7 @@ .fl-overviewPanel .fl-overviewPanel-title { background-color: #333; color: #ccc; - font-family: 'RobotoSlab', serif; + font-family: 'Roboto Slab Variable', serif; height: 5.5em; left: 0; line-height: 2em; diff --git a/src/components/overviewPanel/package.json b/src/components/overviewPanel/package.json index 577959f652..c565e38c3c 100644 --- a/src/components/overviewPanel/package.json +++ b/src/components/overviewPanel/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "jquery": "3.6.0", - "opensans-webkit": "1.1.0", - "roboto-fontface": "0.10.0", + "opensans": "5.0.29", + "roboto-slab": "5.0.20", "fluid-framework": "^4.0.0", "fluid-renderer": "4.0.0" } diff --git a/src/framework/preferences/css/sass/Font_base.scss b/src/framework/preferences/css/sass/Font_base.scss index ba6dca4cd1..b9355ae0ec 100644 --- a/src/framework/preferences/css/sass/Font_base.scss +++ b/src/framework/preferences/css/sass/Font_base.scss @@ -1,7 +1,7 @@ @use "utils/fonts"; .fl-blocking-font { - --fl-font-family: "OpenSans"; + --fl-font-family: "Open Sans Variable"; } // Font face definitions diff --git a/src/framework/preferences/css/sass/SeparatedPanelPrefsEditor.scss b/src/framework/preferences/css/sass/SeparatedPanelPrefsEditor.scss index 85503c8e21..09132d0e4f 100644 --- a/src/framework/preferences/css/sass/SeparatedPanelPrefsEditor.scss +++ b/src/framework/preferences/css/sass/SeparatedPanelPrefsEditor.scss @@ -1,24 +1,11 @@ $icon-font: 'PrefsFramework-Icons'; +/* open-sans-latin-wght-normal */ @font-face { - font-family: 'OpenSans'; + font-family: 'Open Sans Variable'; font-style: normal; - font-weight: 300; - src: url('../../../lib/opensans/fonts/OpenSans-Light.woff'); -} - -@font-face { - font-family: 'OpenSans'; - font-style: normal; - font-weight: normal; - src: url('../../../lib/opensans/fonts/OpenSans-Regular.woff'); -} - -@font-face { - font-family: 'OpenSans'; - font-style: normal; - font-weight: 600; - src: url('../../../lib/opensans/fonts/OpenSans-SemiBold.woff'); + font-weight: 300 800; + src: url('../../../lib/open-sans/files/open-sans-latin-wght-normal.woff2') format('woff2-variations'); } body { @@ -62,7 +49,7 @@ body { background-color: var(--fl-buttonBgColor, #fff); border: none; color: var(--fl-buttonFgColor, #2f2b2a); - font-family: var(--fl-font-family, OpenSans, "Myriad Pro", Helvetica, Arial, sans-serif); + font-family: var(--fl-font-family, "Open Sans Variable", "Myriad Pro", Helvetica, Arial, sans-serif); font-size: calc(var(--fl-enhance-font-size-factor, 1) * var(--fl-textSize, 1rem) * 1.3); letter-spacing: var(--fl-letterSpace); overflow: hidden; @@ -104,7 +91,7 @@ body { .fl-prefsEditor { color: var(--fl-prefsEditorFgColor, #5d5652); - font-family: var(--fl-font-family, "OpenSans", "Myriad Pro", Helvetica, Arial, sans-serif); + font-family: var(--fl-font-family, "Open Sans Variable", "Myriad Pro", Helvetica, Arial, sans-serif); min-width: 100%; overflow-x: scroll; } diff --git a/src/framework/preferences/css/sass/utils/_fonts.scss b/src/framework/preferences/css/sass/utils/_fonts.scss index aaf6fba031..2f5ea5a1e4 100644 --- a/src/framework/preferences/css/sass/utils/_fonts.scss +++ b/src/framework/preferences/css/sass/utils/_fonts.scss @@ -5,7 +5,8 @@ $fonts: ( ".fl-font-verdana": "Verdana", ".fl-font-times": "Georgia, Times, Times New Roman, serif", ".fl-font-comic-sans": "Comic Sans MS, sans-serif", - ".fl-font-open-dyslexic": "OpenDyslexic, sans-serif" + ".fl-font-open-dyslexic": "OpenDyslexic, sans-serif", + ".fl-font-atkinson-hyperlegible": "Atkinson Hyperlegible, sans-serif", ); // Defines any @font-face definitions needed by the enactors @@ -15,23 +16,49 @@ $fontFaces: ( font-family: "OpenDyslexic", definitions: ( normal: ( - filename:"OpenDyslexic-Regular.woff", + filename:"opendyslexic-latin-400-normal.woff2", font-weight: normal, font-style: normal ), bold: ( - filename:"OpenDyslexic-Bold.woff", - font-weight: 600, + filename:"opendyslexic-latin-700-normal.woff2", + font-weight: 700, font-style: normal ), italic: ( - filename:"OpenDyslexic-Italic.woff", + filename:"opendyslexic-latin-400-italic.woff2", font-weight: normal, font-style: italic ), bold-italic: ( - filename:"OpenDyslexic-BoldItalic.woff", - font-weight: 600, + filename:"opendyslexic-latin-700-italic.woff2", + font-weight: 700, + font-style: italic + ) + ) + ), + atkinson-hyperlegible: ( + font-directory: "../../../lib/atkinson-hyperlegible/fonts/", + font-family: "Atkinson Hyperlegible", + definitions: ( + normal: ( + filename:"atkinson-hyperlegible-latin-400-normal.woff2", + font-weight: normal, + font-style: normal + ), + bold: ( + filename:"atkinson-hyperlegible-latin-700-normal.woff2", + font-weight: 700, + font-style: normal + ), + italic: ( + filename:"atkinson-hyperlegible-latin-400-italic.woff2", + font-weight: normal, + font-style: italic + ), + bold-italic: ( + filename:"atkinson-hyperlegible-latin-700-italic.woff2", + font-weight: 700, font-style: italic ) ) diff --git a/src/framework/preferences/js/StarterGrades.js b/src/framework/preferences/js/StarterGrades.js index 7513f2e8af..22d352a906 100644 --- a/src/framework/preferences/js/StarterGrades.js +++ b/src/framework/preferences/js/StarterGrades.js @@ -54,7 +54,8 @@ fluid.defaults("fluid.uiEnhancer.cssClassEnhancerBase", { "comic": "fl-font-comic-sans", "arial": "fl-font-arial", "verdana": "fl-font-verdana", - "open-dyslexic": "fl-font-open-dyslexic" + "open-dyslexic": "fl-font-open-dyslexic", + "atkinson-hyperlegible": "fl-font-atkinson-hyperlegible" }, "theme": { "default": "fl-theme-prefsEditor-default", @@ -249,11 +250,12 @@ fluid.defaults("fluid.prefs.starterPanels", { "textFont-comic", "textFont-arial", "textFont-verdana", - "textFont-open-dyslexic" + "textFont-open-dyslexic", + "textFont-atkinson-hyperlegible" ] }, controlValues: { - textFont: ["default", "times", "comic", "arial", "verdana", "open-dyslexic"] + textFont: ["default", "times", "comic", "arial", "verdana", "open-dyslexic", "atkinson-hyperlegible"] } } }, diff --git a/src/framework/preferences/js/StarterSchemas.js b/src/framework/preferences/js/StarterSchemas.js index 2aa4e6f899..547a4dd49a 100644 --- a/src/framework/preferences/js/StarterSchemas.js +++ b/src/framework/preferences/js/StarterSchemas.js @@ -78,7 +78,8 @@ fluid.defaults("fluid.prefs.auxSchema.textFont", { "comic": "fl-font-comic-sans", "arial": "fl-font-arial", "verdana": "fl-font-verdana", - "open-dyslexic": "fl-font-open-dyslexic" + "open-dyslexic": "fl-font-open-dyslexic", + "atkinson-hyperlegible": "fl-font-atkinson-hyperlegible" } }, panel: { @@ -91,7 +92,8 @@ fluid.defaults("fluid.prefs.auxSchema.textFont", { "comic": "fl-font-comic-sans", "arial": "fl-font-arial", "verdana": "fl-font-verdana", - "open-dyslexic": "fl-font-open-dyslexic" + "open-dyslexic": "fl-font-open-dyslexic", + "atkinson-hyperlegible": "fl-font-atkinson-hyperlegible" } }, template: "%templatePrefix/PrefsEditorTemplate-textFont.html", @@ -223,14 +225,15 @@ fluid.defaults("fluid.prefs.schemas.textFont", { "fluid.prefs.textFont": { "type": "string", "default": "default", - "enum": ["default", "times", "comic", "arial", "verdana", "open-dyslexic"], + "enum": ["default", "times", "comic", "arial", "verdana", "open-dyslexic", "atkinson-hyperlegible"], "enumLabels": [ "textFont-default", "textFont-times", "textFont-comic", "textFont-arial", "textFont-verdana", - "textFont-open-dyslexic" + "textFont-open-dyslexic", + "textFont-atkinson-hyperlegible" ] } } diff --git a/src/framework/preferences/messages/textFont.json b/src/framework/preferences/messages/textFont.json index 00d3b3ee9c..19c8264bf5 100644 --- a/src/framework/preferences/messages/textFont.json +++ b/src/framework/preferences/messages/textFont.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "text style", "textFontDescr": "Change the font used" } diff --git a/src/framework/preferences/messages/textFont_en.json b/src/framework/preferences/messages/textFont_en.json index 00d3b3ee9c..19c8264bf5 100644 --- a/src/framework/preferences/messages/textFont_en.json +++ b/src/framework/preferences/messages/textFont_en.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "text style", "textFontDescr": "Change the font used" } diff --git a/src/framework/preferences/messages/textFont_en_CA.json b/src/framework/preferences/messages/textFont_en_CA.json index 00d3b3ee9c..19c8264bf5 100644 --- a/src/framework/preferences/messages/textFont_en_CA.json +++ b/src/framework/preferences/messages/textFont_en_CA.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "text style", "textFontDescr": "Change the font used" } diff --git a/src/framework/preferences/messages/textFont_en_US.json b/src/framework/preferences/messages/textFont_en_US.json index 00d3b3ee9c..19c8264bf5 100644 --- a/src/framework/preferences/messages/textFont_en_US.json +++ b/src/framework/preferences/messages/textFont_en_US.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "text style", "textFontDescr": "Change the font used" } diff --git a/src/framework/preferences/messages/textFont_es.json b/src/framework/preferences/messages/textFont_es.json index d012c626e1..373de69bb3 100644 --- a/src/framework/preferences/messages/textFont_es.json +++ b/src/framework/preferences/messages/textFont_es.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "estilo de texto", "textFontDescr": "Cambiar la fuente utilizada" } diff --git a/src/framework/preferences/messages/textFont_fa.json b/src/framework/preferences/messages/textFont_fa.json index 5d1b0739a7..6738984670 100644 --- a/src/framework/preferences/messages/textFont_fa.json +++ b/src/framework/preferences/messages/textFont_fa.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "نوع فونت", "textFontDescr": "تغییر فونت استفاده شده " } diff --git a/src/framework/preferences/messages/textFont_fr.json b/src/framework/preferences/messages/textFont_fr.json index 5909410b6c..fa23014491 100644 --- a/src/framework/preferences/messages/textFont_fr.json +++ b/src/framework/preferences/messages/textFont_fr.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "style du texte", "textFontDescr": "Ajuster la police de caracteres utilisée" } diff --git a/src/framework/preferences/messages/textFont_pt_BR.json b/src/framework/preferences/messages/textFont_pt_BR.json index 4154cfb5bb..26936de5a8 100644 --- a/src/framework/preferences/messages/textFont_pt_BR.json +++ b/src/framework/preferences/messages/textFont_pt_BR.json @@ -5,6 +5,7 @@ "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "estilo do texto", "textFontDescr": "Mudar fonte utilizada" } diff --git a/src/framework/preferences/package.json b/src/framework/preferences/package.json index 4668324048..1c8a10a9f7 100644 --- a/src/framework/preferences/package.json +++ b/src/framework/preferences/package.json @@ -48,8 +48,9 @@ "jquery": "3.6.0", "jquery-ui": "1.12.1", "hypher": "0.2.5", - "opensans-webkit": "1.1.0", - "open-dyslexic": "1.0.3", + "opensans": "5.0.29", + "opendyslexic": "5.0.11", + "atkinson-hyperlegible": "5.0.20", "fluid-framework": "^4.0.0", "fluid-enhancement": "4.0.0", "fluid-renderer": "4.0.0", diff --git a/src/lib/package.json b/src/lib/package.json index 0a2ce5c31a..f701127e1e 100644 --- a/src/lib/package.json +++ b/src/lib/package.json @@ -79,20 +79,26 @@ "jquery-ui": "1.12.1" } }, { - "name": "open-dyslexic", + "name": "atkinson-hyperlegible", + "description": "Atkinson Hyperlegible web font.", + "infusion": { + "dir": "./atkinson-hyperlegible" + } + }, { + "name": "opendyslexic", "description": "Open Dyslexic web font.", "infusion": { - "dir": "./open-dyslexic" + "dir": "./opendyslexic" } }, { - "name": "opensans-webkit", + "name": "opensans", "description": "Open Sans web font.", "infusion": { "dir": "./opensans" } }, { - "name": "roboto-fontface", - "description": "Roboto web font.", + "name": "roboto-slab", + "description": "Roboto Slab web font.", "infusion": { "dir": "./roboto" } diff --git a/tests/framework-tests/preferences/data/textFont_en.json b/tests/framework-tests/preferences/data/textFont_en.json index 8820eadd1e..862101eb84 100644 --- a/tests/framework-tests/preferences/data/textFont_en.json +++ b/tests/framework-tests/preferences/data/textFont_en.json @@ -4,6 +4,7 @@ "textFont-comic": "Comic Sans", "textFont-arial": "Arial", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFont-verdana": "Verdana", "textFontLabel": "Text Style" } diff --git a/tests/framework-tests/preferences/js/IntegrationTestsCommon.js b/tests/framework-tests/preferences/js/IntegrationTestsCommon.js index 2070c45dda..42bb505166 100644 --- a/tests/framework-tests/preferences/js/IntegrationTestsCommon.js +++ b/tests/framework-tests/preferences/js/IntegrationTestsCommon.js @@ -185,8 +185,8 @@ fluid.tests.prefs.enhancerOptions = { } }; -fluid.tests.prefs.testStrings = ["Test1", "Test2", "Test3", "Test4", "Test5", "Test6"]; -fluid.tests.prefs.testControlValues = ["a", "b", "c", "d", "e", "f"]; +fluid.tests.prefs.testStrings = ["Test1", "Test2", "Test3", "Test4", "Test5", "Test6", "Test7"]; +fluid.tests.prefs.testControlValues = ["a", "b", "c", "d", "e", "f", "g"]; fluid.tests.prefs.testComponentIntegration = function (prefsEditor) { var body = $("body"); @@ -199,13 +199,13 @@ fluid.tests.prefs.testComponentIntegration = function (prefsEditor) { var actualTextFontStrings = prefsEditor.textFont.options.strings.textFont; var actualTextFontControlValues = prefsEditor.textFont.options.controlValues.textFont; - jqUnit.assertEquals("There are 6 elements in the text font string list", 6, actualTextFontStrings.length); + jqUnit.assertEquals("There are 7 elements in the text font string list", 7, actualTextFontStrings.length); jqUnit.assertEquals("The first text font string value matches", testStrings[0], actualTextFontStrings[0]); - jqUnit.assertEquals("The sixth text font string value matches", testStrings[5], actualTextFontStrings[5]); + jqUnit.assertEquals("The seventh text font string value matches", testStrings[6], actualTextFontStrings[6]); - jqUnit.assertEquals("There are 6 elements in the text font control value list", 6, actualTextFontControlValues.length); + jqUnit.assertEquals("There are 7 elements in the text font control value list", 7, actualTextFontControlValues.length); jqUnit.assertEquals("The first text font control value matches", testControlValues[0], actualTextFontControlValues[0]); - jqUnit.assertEquals("The sixth text font control value matches", testControlValues[5], actualTextFontControlValues[5]); + jqUnit.assertEquals("The seventh text font control value matches", testControlValues[6], actualTextFontControlValues[6]); }; fluid.defaults("fluid.tests.prefs.mungingIntegrationBase", { diff --git a/tests/framework-tests/preferences/js/PanelsTests.js b/tests/framework-tests/preferences/js/PanelsTests.js index 56811a9fc4..a55dda2127 100644 --- a/tests/framework-tests/preferences/js/PanelsTests.js +++ b/tests/framework-tests/preferences/js/PanelsTests.js @@ -1045,6 +1045,7 @@ fluid.defaults("fluid.tests.prefs.panel.textFont", { "textFont-arial": "Arial", "textFont-verdana": "Verdana", "textFont-open-dyslexic": "Open Dyslexic", + "textFont-atkinson-hyperlegible": "Atkinson Hyperlegible", "textFontLabel": "text style", "textFontDescr": "Change the font used" }, @@ -1063,7 +1064,8 @@ fluid.defaults("fluid.tests.prefs.panel.textFont", { "comic": "fl-font-comic-sans", "arial": "fl-font-arial", "verdana": "fl-font-verdana", - "open-dyslexic": "fl-font-open-dyslexic" + "open-dyslexic": "fl-font-open-dyslexic", + "atkinson-hyperlegible": "fl-font-atkinson-hyperlegible" } }, stringArrayIndex: { @@ -1073,11 +1075,12 @@ fluid.defaults("fluid.tests.prefs.panel.textFont", { "textFont-comic", "textFont-arial", "textFont-verdana", - "textFont-open-dyslexic" + "textFont-open-dyslexic", + "textFont-atkinson-hyperlegible" ] }, controlValues: { - textFont: ["default", "times", "comic", "arial", "verdana", "open-dyslexic"] + textFont: ["default", "times", "comic", "arial", "verdana", "open-dyslexic", "atkinson-hyperlegible"] } }); @@ -1115,14 +1118,14 @@ fluid.setLogging(true); fluid.defaults("fluid.tests.textFontTester", { gradeNames: ["fluid.test.testCaseHolder"], testOptions: { - expectedNumOfOptions: 6, + expectedNumOfOptions: 7, defaultValue: "default", newValue: "comic" }, modules: [{ name: "Test the text font settings panel", tests: [{ - expect: 10, + expect: 11, name: "Test the rendering of the text font panel", sequence: [{ listener: "fluid.tests.textFontPanel.testDefault", diff --git a/tests/framework-tests/preferences/js/PrefsEditorTests.js b/tests/framework-tests/preferences/js/PrefsEditorTests.js index 802fb61d86..c1e1edc629 100644 --- a/tests/framework-tests/preferences/js/PrefsEditorTests.js +++ b/tests/framework-tests/preferences/js/PrefsEditorTests.js @@ -152,7 +152,7 @@ fluid.tests.prefs.assertInit = function (prefsEditor) { jqUnit.assertEquals("Initialization: The first theme is default", "default", themeValues[0]); var fontValues = prefsEditor.textFont.options.controlValues.textFont; - jqUnit.assertEquals("Initialization: There are 6 font values in font style adjuster", 6, fontValues.length); + jqUnit.assertEquals("Initialization: There are 7 font values in font style adjuster", 7, fontValues.length); jqUnit.assertTrue("Initialization: There is a default font value", fontValues.indexOf("default") !== -1); jqUnit.assertEquals("Initialization: The onPrefsEditorRefresh event has been called once", 1, prefsEditor.refreshCount); From e14ba0fa0945b3adf4bfc0a42952aa2fa885add2 Mon Sep 17 00:00:00 2001 From: Justin Obara Date: Thu, 11 Jul 2024 08:13:45 -0400 Subject: [PATCH 2/4] FLUID-6763: fix a typo in font path --- src/framework/preferences/css/sass/utils/_fonts.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/preferences/css/sass/utils/_fonts.scss b/src/framework/preferences/css/sass/utils/_fonts.scss index 2f5ea5a1e4..3699d0f57a 100644 --- a/src/framework/preferences/css/sass/utils/_fonts.scss +++ b/src/framework/preferences/css/sass/utils/_fonts.scss @@ -12,7 +12,7 @@ $fonts: ( // Defines any @font-face definitions needed by the enactors $fontFaces: ( open-dyslexic: ( - font-directory: "../../../lib/open-dyslexic/fonts/", + font-directory: "../../../lib/opendyslexic/fonts/", font-family: "OpenDyslexic", definitions: ( normal: ( From dcc7cb3b4a5dbf47aba0a179ae31dab9e816ee44 Mon Sep 17 00:00:00 2001 From: Justin Obara Date: Thu, 11 Jul 2024 08:36:28 -0400 Subject: [PATCH 3/4] FLUID-6763: correct font module names --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2908ec1db0..d5c961f3d0 100644 --- a/README.md +++ b/README.md @@ -229,16 +229,16 @@ The zip files will obliterate the contents of the `products` directory and must #### External Libraries -* @fontsource-variable/open-sans -* @fontsource-variable/roboto-slab -* @fontsource/atkinson-hyperlegible -* @fontsource/opendyslexic +* atkinson-hyperlegible * fast-xml-pull * hypher * jquery * jquery-ui * jquery-scrollto * jquery-ui-touch-punch +* opendyslexic +* opensans +* roboto-slab ## How Do I Run Tests? From 4729c0760ed3dfe249220fea2e8c9285b380f950 Mon Sep 17 00:00:00 2001 From: Justin Obara Date: Thu, 11 Jul 2024 08:44:07 -0400 Subject: [PATCH 4/4] NOJIRA: update CI node versions --- .github/workflows/ci-build.yml | 2 +- .github/workflows/ci-lint.yml | 4 ++-- .github/workflows/ci-test.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 000f5e857d..09b689604c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - node-version: [12.x, 14.x] + node-version: [18.x, 20.x, 22.x] steps: - name: Prepare git diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 9a616116da..9a29a11084 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -14,10 +14,10 @@ jobs: - uses: actions/checkout@v2 - - name: Use Node.js 14 + - name: Use Node.js 20 uses: actions/setup-node@v1 with: - node-version: 14.x + node-version: 20.x - name: Get npm cache directory id: npm-cache diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 931f9c13a3..f3a487fbc8 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - node-version: [12.x, 14.x] + node-version: [18.x, 20.x, 22.x] env: HEADLESS: true