How to use local fonts in Maximenu

How to use local fonts in Maximenu was created by Magh

Posted 4 years 1 month ago #55044
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?
by Magh

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

Replied by ced1870 on topic How to use local fonts in Maximenu

Posted 4 years 1 month ago #55046
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

by ced1870

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

Replied by Magh on topic How to use local fonts in Maximenu

Posted 4 years 1 month ago #55053
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).
by Magh

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

Replied by ced1870 on topic How to use local fonts in Maximenu

Posted 4 years 1 month ago #55055
yes thank you for your suggestion, I note this :)

Joomlack Webmaster and Developer

by ced1870

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

Replied by ced1870 on topic How to use local fonts in Maximenu

Posted 4 years 1 month ago #55149
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

by ced1870

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

Replied by Magh on topic How to use local fonts in Maximenu

Posted 4 years 1 month ago #55153
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).
by Magh

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

Time to create page: 0.675 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1310 guests and no members online