- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
install google font local
Hi!
I want to install google font local.
I have tried to change in the settings the theme settings at font the Basic Font Family to: Select Custom Fonts and choose the Font Family - Custom Fonts: Open Sans.
But I use still google fonts on my website agoshop.at
Hope someone can help me there.
kindly regards
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Hi @haiflosse117fc ,
Please refer https://meetanshi.com/blog/add-and-use-google-fonts-in-magento-2/
Problem Solved? Accept as Solution!
Hope it helps!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Hello @haiflosse117fc
Put the following code at Vendor\Extension\View\frontend\layout\default_head_blocks.xml file or Vendor\Your_Theme\Magento_Theme\layout\default_head_blocks.xml
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <link rel="stylesheet" type="text/css" src="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800" src_type="url" /> </head> </page>
Take reference of above code. It may help you!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Hi.
This is a missunderstanding.
I already use the Google fonts. But I don't want to use a Google font Link. The fonts should install local on the server.
Like usehttps://www.ccm19.de/google-fonts-checker/?scanurl=agoshop.at&googlefontchecker=check&scanstart=Check+starte... I use the following font files:
- https://fonts.gstatic.com/s/opensans/v34/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2
- https://fonts.gstatic.com/s/lato/v23/S6uyw4BMUTPHjx4wXg.woff2
- https://fonts.gstatic.com/s/poppins/v20/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2
- https://fonts.gstatic.com/s/lato/v23/S6u9w4BMUTPHh6UVSwiPGQ.woff2
- https://fonts.gstatic.com/s/poppins/v20/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2
- https://fonts.gstatic.com/s/poppins/v20/pxiEyp8kv8JHgFVrJJfecg.woff2
- https://fonts.gstatic.com/s/lato/v23/S6u9w4BMUTPHh7USSwiPGQ.woff2
and the following css link which load Google fonts:
- https://fonts.googleapis.com/css?display=swap&family=Lato:100,100i,300,300i,400,400i,700,700i,900,90...
- https://fonts.googleapis.com/css?display=swap&family=Poppins:300,400,500,600,700
- https://fonts.googleapis.com/css?display=swap&family=Open Sans:400,300,700
Hope someone can informe me how I can use the fonts direct without the Google link.
Kindly regards
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Please read the following article https://simplify-everything.com/en/blog/2019/05/30/how-to-host-google-fonts-local-through-css/ it has detailed explanation about hosting the Google fonts locally.
In the article there is a service link using which you can download the font and configure the CSS as given in the article.
Give it a try and see if it works for you.
Thanks
Problem Solved Click Accept as Solution!:Magento Community India Forum
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Thanks for your answer.
It seems that is an instruction for wordpress.
In which folder or subfolder can I upload the fonts?
In which stylesheet file or where can I find my stylesheet file can I insert the ccs code?
kindly regards again
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Hi @haiflosse117fc ,
Please check this one https://developer.adobe.com/commerce/frontend-core/guide/css/fonts/
Problem Solved? Accept as Solution!
Hope it helps!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Hey @haiflosse117fc
You must add the following line to the head> section of your HTML page to include the Montserrat font on your website in its regular, regular italic, bold, and bold italic variations:
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
Then, you may include the following CSS rule in any CSS file selector:
div { font-family: 'Montserrat', sans-serif; }
You can see all fonts by entering the URL in a browser. Also, you can customize the font family as you want.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: install google font local
Hey there! I've tinkered with fonts, too. To install Google fonts locally, you might need to download the font files and then upload them to your website. Once they're on your server, you can reference them in your CSS. Make sure you've cleared your browser cache, too. It can sometimes hang on to old font references. Or, you could use this gstatic guide to manage your site's fonts. I hope this helps!