Getting started
Theme settings
Blocks
- Hero
- About us
- Boxes
- Categories slider
- Courses slider
- Blogs slider
- Instructors slider
- Testimonials slider
- Subscribe with us
- Contact Us
- Accordion
- Timeline
- Categories page
- Courses page
- Instructors page
- Course description
- Course video
- Course tabs
- Course features
- Course details
- Course need help
- Featured course
Fonts
To change the font used by the theme:
1. Add Font Files:
In the theme folder, you will find an empty folder named fonts
/theme/nice/fonts/
Place your font files inside this folder.
Example:
/theme/nice/fonts/Roboto-Regular.ttf
/theme/nice/fonts/Roboto-VariableFont_wght.ttf
2. Register Fonts in Raw Initial SCSS
Go to: Site administration > Appearance > Themes > Nice Learning > Advanced settings
Paste the following in Raw initial SCSS:
@font-face {
font-family: 'Roboto';
src: url([[font:theme|Roboto-Regular.ttf]]) format('truetype');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Roboto VF';
src: url([[font:theme|Roboto-VariableFont_wght.ttf]]) format('truetype');
font-weight: 100 1000;
font-style: normal;
}
3: Raw SCSS
Paste:
body, h1, h2, h3, h4, h5, h6, p, input, textarea, select, button {
font-family: 'Roboto', sans-serif;
}
Or if you want to use the variable version:
font-family: 'Roboto', sans-serif;
4: Purge Moodle Cache
Go to: Site administration > Development > Purge all caches
Then refresh your site — fontt should now be active throughout your theme.
Optional: Language-Specific Styling
If you want to apply the font only to specific languages:
html[lang="en"] body {
font-family: 'Roboto', sans-serif;
}