1 |
efrain |
1 |
DESCRIPTION OF FONT AWESOME IMPORT INTO MOODLE
|
|
|
2 |
-----------------------------------------------
|
|
|
3 |
|
|
|
4 |
Download the latest free web version from https://github.com/FortAwesome/Font-Awesome/
|
|
|
5 |
|
|
|
6 |
Font Awesome comes in 2 parts relating to Moodle:
|
|
|
7 |
|
|
|
8 |
1. Fonts:
|
|
|
9 |
a. Replace the content in lib/fonts with the files in the webfonts folder.
|
|
|
10 |
b. Update lib/thirdpartylibs.xml.
|
|
|
11 |
|
|
|
12 |
2. SCSS:
|
|
|
13 |
a. Replace the files in this folder (/theme/boost/scss/fontawesome) with the files in the scss folder.
|
|
|
14 |
b. Copy the LICENSE.txt file from the root to theme/boost/scss/fontawesome.
|
|
|
15 |
c. Update theme/boost/thirdpartylibs.xml.
|
|
|
16 |
|
|
|
17 |
CHANGES
|
|
|
18 |
--------
|
|
|
19 |
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:
|
|
|
20 |
|
|
|
21 |
url('#{$fa-font-path}/fa-xxxxx-400.zzzzz') format('zzzzz')
|
|
|
22 |
|
|
|
23 |
with
|
|
|
24 |
|
|
|
25 |
url('[[font:core|fa-xxxxx-400.zzzzz]]') format('zzzzz'),
|
|
|
26 |
|
|
|
27 |
FINALLY
|
|
|
28 |
--------
|
|
|
29 |
|
|
|
30 |
After applying the previous changes to the library:
|
|
|
31 |
|
|
|
32 |
1. Update the Component library files (for instance, admin/tool/componentlibrary/content/moodle/components/moodle-icons.md).
|
|
|
33 |
|
|
|
34 |
2. Run `php admin/tool/componentlibrary/cli/fetchicons.php` to update admin/tool/componentlibrary/hugo/site/data/fontawesomeicons.json
|
|
|
35 |
|
|
|
36 |
3. Run `grunt` to update the CSS style files and the Component library files.
|