Here how to add custom font on your moodle ( mine version 3.5 and using theme called “clean” )
Create a folder called “fonts” on your theme directory , example
theme/clean/fonts
Upload your font there , for example I just user one TTF file of “lato” font , example :
theme/clean/fonts/Lato-Regular.ttf
Open the theme custom.css file on your theme directory ( not custom CSS from Moodle web admin menu ) , for example
theme/clean/style/custom.css
Add css below on your custom.css
@font-face { font-family: 'lato'; src: url([[font:theme|Lato-Regular.ttf]]) format('truetype'); font-weight: normal; font-style: normal; }
Use it on your body tag
body { font-family: lato; }
Don’t forget to “purge all cache” before you test it on
<your_moodle_address>/admin/purgecaches.php
Leave a Reply