Adding Custom TTL Fonts To Project

When importing new fonts via TTL files, I’m unsure if I’m following best practices within Mendix.   For my project, I’ve first created a CSS file to create a font face for the custom TTF file:   This is then imported using the “custom-variables.scss” file:   Finally, the font is used in the “main.scss” file to call the font to only be used for h1 elements.   However, I’ve stored the custom font files inside the Atlas_Core file, which doesn’t feel like best practice. Is there another location in the project where I can store custom fonts that can still be accessed by the “custom-variables.scss” file?
1 answers

Hi Liam,


It's not wise to use the Atlas_Core module for this. Customizing your styling is usually done in a custom styling module or your own theme folder. This folder structure can be found under your App settings:

or the ‘theme’ folder in the File Explorer

It’s best to place your fonts in this folder. This way it won't be deleted when the Atlas_Core module is updated.

Putting your fonts in this folder allows custom-variables.scss to still access them.


Hope this helps!