From 99e38b71187fdc7d8d697065834fe496d5ab5203 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Thu, 27 Apr 2023 13:11:58 +0200 Subject: [PATCH] MDL-78052 lib: Set Moodle files after Font Awesome upgrade --- .../content/moodle/components/moodle-icons.md | 2 +- theme/boost/scss/fontawesome/brands.scss | 5 +++-- theme/boost/scss/fontawesome/readme_moodle.txt | 2 +- theme/boost/scss/fontawesome/regular.scss | 5 +++-- theme/boost/scss/fontawesome/solid.scss | 5 +++-- theme/boost/style/moodle.css | 22 +++++----------------- theme/classic/style/moodle.css | 22 +++++----------------- 7 files changed, 21 insertions(+), 42 deletions(-) diff --git a/admin/tool/componentlibrary/content/moodle/components/moodle-icons.md b/admin/tool/componentlibrary/content/moodle/components/moodle-icons.md index 16c9397c304..56d0d365972 100644 --- a/admin/tool/componentlibrary/content/moodle/components/moodle-icons.md +++ b/admin/tool/componentlibrary/content/moodle/components/moodle-icons.md @@ -11,7 +11,7 @@ tags: ## Description -Most Moodle icons are rendered using the 6.3 versions of [Fontawesome](https://fontawesome.com/v6/search). Iconnames are mapped from the Moodle icon name to the Font Awesome icon names in `/lib/classes/output/icon_system_fontawesome.php` +Most Moodle icons are rendered using the 6.4 versions of [Fontawesome](https://fontawesome.com/v6/search). Iconnames are mapped from the Moodle icon name to the Font Awesome icon names in `/lib/classes/output/icon_system_fontawesome.php` If needed a theme can override this map and provide its own mapping. diff --git a/theme/boost/scss/fontawesome/brands.scss b/theme/boost/scss/fontawesome/brands.scss index fcea4625948..438e4e00067 100644 --- a/theme/boost/scss/fontawesome/brands.scss +++ b/theme/boost/scss/fontawesome/brands.scss @@ -16,8 +16,9 @@ font-style: normal; font-weight: 400; font-display: $fa-font-display; - src: url('#{$fa-font-path}/fa-brands-400.woff2') format('woff2'), - url('#{$fa-font-path}/fa-brands-400.ttf') format('truetype'); + src: + url('[[font:core|fa-brands-400.woff2]]') format('woff2'), + url('[[font:core|fa-brands-400.ttf]]') format('truetype'); } .fab, diff --git a/theme/boost/scss/fontawesome/readme_moodle.txt b/theme/boost/scss/fontawesome/readme_moodle.txt index 9d49f82eae3..a2b04a4e060 100644 --- a/theme/boost/scss/fontawesome/readme_moodle.txt +++ b/theme/boost/scss/fontawesome/readme_moodle.txt @@ -16,7 +16,7 @@ Font Awesome comes in 2 parts relating to Moodle: CHANGES -------- -1. The fonts need to be provided using the [[font:core|xxxx]] method. Edit fontawesome/brands.scss, fontawesome/regular.scss, fontawesome/solid.scss and fontawesome/v4-shims.scss and replace: +1. The fonts need to be provided using the [[font:core|xxxx]] method. Edit fontawesome/brands.scss, fontawesome/regular.scss and fontawesome/solid.scss to replace: url('#{$fa-font-path}/fa-xxxxx-400.zzzzz') format('zzzzz') diff --git a/theme/boost/scss/fontawesome/regular.scss b/theme/boost/scss/fontawesome/regular.scss index 40d175379bc..6b2fa234e95 100644 --- a/theme/boost/scss/fontawesome/regular.scss +++ b/theme/boost/scss/fontawesome/regular.scss @@ -16,8 +16,9 @@ font-style: normal; font-weight: 400; font-display: $fa-font-display; - src: url('#{$fa-font-path}/fa-regular-400.woff2') format('woff2'), - url('#{$fa-font-path}/fa-regular-400.ttf') format('truetype'); + src: + url('[[font:core|fa-regular-400.woff2]]') format('woff2'), + url('[[font:core|fa-regular-400.ttf]]') format('truetype'); } .far, diff --git a/theme/boost/scss/fontawesome/solid.scss b/theme/boost/scss/fontawesome/solid.scss index 3dd635f15bd..2dfd72c2bbb 100644 --- a/theme/boost/scss/fontawesome/solid.scss +++ b/theme/boost/scss/fontawesome/solid.scss @@ -16,8 +16,9 @@ font-style: normal; font-weight: 900; font-display: $fa-font-display; - src: url('#{$fa-font-path}/fa-solid-900.woff2') format('woff2'), - url('#{$fa-font-path}/fa-solid-900.ttf') format('truetype'); + src: + url('[[font:core|fa-solid-900.woff2]]') format('woff2'), + url('[[font:core|fa-solid-900.ttf]]') format('truetype'); } .fas, diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 29bca042afc..63c49d747a5 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -1,6 +1,6 @@ @charset "UTF-8"; /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -2026,7 +2026,7 @@ } /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -2049,7 +2049,7 @@ } /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -2093,7 +2093,7 @@ } /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -4911,20 +4911,8 @@ font-weight: 400; } -:root, :host { - --fa-style-family-brands: "Font Awesome 4 Compatibility"; - --fa-font-brands: normal 400 1em/1 "Font Awesome 4 Compatibility"; -} - -@font-face { - font-family: "Font Awesome 4 Compatibility"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("[[font:core|fa-v4compatibility.woff2]]") format("woff2"), url("[[font:core|fa-v4compatibility.ttf]]") format("truetype"); -} /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 242f9566cce..72a3f9407cd 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -1,6 +1,6 @@ @charset "UTF-8"; /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -2026,7 +2026,7 @@ } /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -2049,7 +2049,7 @@ } /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -2093,7 +2093,7 @@ } /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ @@ -4911,20 +4911,8 @@ font-weight: 400; } -:root, :host { - --fa-style-family-brands: "Font Awesome 4 Compatibility"; - --fa-font-brands: normal 400 1em/1 "Font Awesome 4 Compatibility"; -} - -@font-face { - font-family: "Font Awesome 4 Compatibility"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("[[font:core|fa-v4compatibility.woff2]]") format("woff2"), url("[[font:core|fa-v4compatibility.ttf]]") format("truetype"); -} /*! - * Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2023 Fonticons, Inc. */ -- 2.11.4.GIT