Skip to content

Commit

Permalink
Fix FA v4-compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Sep 25, 2023
1 parent d205143 commit d21db78
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 83 deletions.
1 change: 1 addition & 0 deletions classes/toolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public function get_core_framework_scss() {
$scss .= '@import "fontawesome/regular";' . PHP_EOL;
$scss .= '@import "fontawesome/solid";' . PHP_EOL;
if (!empty($this->get_setting('faiv'))) {
$scss .= '@import "fontawesome/v4-compatibility";' . PHP_EOL;
$scss .= '@import "fontawesome/v4-shims";' . PHP_EOL;
}
}
Expand Down
10 changes: 9 additions & 1 deletion scss/fontawesome.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// Import FontAwesome.

$fa-version: "6.4.0" !default;
$fa-version: "6.4.2" !default;

@import "fontawesome/brands";
@import "fontawesome/regular";
@import "fontawesome/solid";
@import "fontawesome/v4-shims";

@font-face {
font-family: 'FontAwesome';
font-display: $fa-font-display;
src: url('[[font:theme|fa-v4compatibility.woff2]]') format('woff2'),
url('[[font:theme|fa-v4compatibility.ttf]]') format('truetype');
unicode-range: U+F041,U+F047,U+F065-F066,U+F07D-F07E,U+F080,U+F08B,U+F08E,U+F090,U+F09A,U+F0AC,U+F0AE,U+F0B2,U+F0D0,U+F0D6,U+F0E4,U+F0EC,U+F10A-F10B,U+F123,U+F13E,U+F148-F149,U+F14C,U+F156,U+F15E,U+F160-F161,U+F163,U+F175-F178,U+F195,U+F1F8,U+F219,U+F27A; }

@import "fontawesome/fontawesome";
14 changes: 14 additions & 0 deletions scss/fontawesome/v4-compatibility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*!
* Font Awesome Free 6.4.2 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.
*/
// V4 compatibility
// -------------------------

@font-face {
font-family: 'FontAwesome';
font-display: $fa-font-display;
src: url('[[font:theme|fa-v4compatibility.woff2]]') format('woff2'),
url('[[font:theme|fa-v4compatibility.ttf]]') format('truetype');
unicode-range: U+F041,U+F047,U+F065-F066,U+F07D-F07E,U+F080,U+F08B,U+F08E,U+F090,U+F09A,U+F0AC,U+F0AE,U+F0B2,U+F0D0,U+F0D6,U+F0E4,U+F0EC,U+F10A-F10B,U+F123,U+F13E,U+F148-F149,U+F14C,U+F156,U+F15E,U+F160-F161,U+F163,U+F175-F178,U+F195,U+F1F8,U+F219,U+F27A; }
Loading

0 comments on commit d21db78

Please sign in to comment.