BAZ Moodle Theme
Get BAZ ThemeSupport
  • BAZ Premium Moodle Theme
  • Requirements
  • Changelog
  • Getting started
    • Theme Installation/Update
    • Demo content
    • RTL Layout
    • Custom Enrollment Page
    • Custom E-Mail Template
  • 🤩Global Styles
    • Typography
    • UI Elements
    • Headings/Text Modifications
  • Theme Settings
    • General
    • SEO
    • Customization
      • Google Fonts
      • Colors
    • Login page
    • Front Page Blocks
      • Block #1
      • Block #2
      • Block #3
      • Block #4
      • Block #5
      • Block #6
      • Block #7
      • Block #8
      • Block #9
      • Block #10
      • Block #11
      • Block #12
      • Block #13
      • todo Block #14
      • Block #15
      • Block #16
      • Block #17
      • todo Block #18
      • Block #19
      • How to add more item to blocks?
    • Top Bar
      • User Menu - Custom Icons
    • Dashboard
    • Course Page
    • Footer
    • Custom Fonts
  • More
    • 🕶️Show/hide for non-logged in users
    • 🌑Show/hide on the Dark Mode
    • Translations
    • Server recommendations
    • Graphics, Icons etc.
Powered by GitBook
On this page

Was this helpful?

  1. Theme Settings

Custom Fonts

PreviousFooterNextShow/hide for non-logged in users

Last updated 2 years ago

Was this helpful?

1. Files to upload -> Advanced -> fontfiles

2. TTF, OTF, WOFF, WOFF2 or SVG Converter

Explanation:

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

Raw SCSS to add

Change 'YOURURL' to the real one eg. for local environment:

  • localhost/....

  • https://url.com/...

@font-face {
    font-family: 'Poppins', Arial, Helvetica, sans-seri;
    src: url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Medium.eot');
    src: url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Medium.eot?#iefix') format('embedded-opentype'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Medium.woff2') format('woff2'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Medium.woff') format('woff'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
  }
  
  @font-face {
    font-family: 'Poppins', Arial, Helvetica, sans-seri;
    src: url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Regular.eot');
    src: url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Regular.eot?#iefix') format('embedded-opentype'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Regular.woff2') format('woff2'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Regular.woff') format('woff'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }
  
  @font-face {
    font-family: 'Poppins', Arial, Helvetica, sans-seri;
    src: url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Bold.eot');
    src: url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Bold.eot?#iefix') format('embedded-opentype'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Bold.woff2') format('woff2'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Bold.woff') format('woff'),
        url('YOUR_URL/pluginfile.php/1/theme_space/fontfiles/0/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
  body {
        font-family: 'Poppins', Arial, Helvetica, sans-seri;
  }

Learn more How to use @font-face in CSS ->

https://css-tricks.com/snippets/css/using-font-face-in-css/
Online @font-face generatorTransfonter
Logo