How to use local fonts in Maximenu

More
4 years 10 months ago #55044 by Magh
Hello again,

I need to style the menu fonts and use local fonts loaded in the template. It's a gantry 5 template and all the local fonts used throughout the site are imported throught its main custom.scss e.g. to use Roboto Condensed:
@import "dependencies";
@include font-face('RobotoCL', 'gantry-theme://fonts/RobotoCond-Light-webfont', 300);

Then by specifying font-family: RobotoCL anywhere e.g. in an article's code or a class, that font is used. But from Maximenu Parameters this doesn't happen - it keeps requiring google fonts. How can I use the local fonts instead?

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #55046 by ced1870
Hi
you should do that using custom css because the system will automatically check if the font exists on GoogleFonts, and if yes it will load it
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #55053 by Magh
Ah, so the relevanty styling for local fonts is to be added in the menu's own custom.css, found in Parameters - if I understood correctly.

This could be a feature for a next version of your module - to be able to use local fonts (as defined from the template).

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #55055 by ced1870
yes thank you for your suggestion, I note this :)

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
4 years 9 months ago #55149 by ced1870
Hi
since the 9.0.2 (pro) you can choose how to load the google fonts
you can set it to "custom" and write your own urls, or set "none" if you already have your own font loaded
hope it helps
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
4 years 9 months ago #55153 by Magh
Works. :)

Tested for top menu, submenu.
And the font size field also takes rem vaules and works fine (although rems are not included in its tooltip description).

Please Log in or Create an account to join the conversation.

Time to create page: 0.206 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1823 guests and 3 members online