<link src="http://fonts.googleapis.com/css?family=Montserrat" src_type="url" />
But as a result it is not working. Correct code is
<link src="https://fonts.googleapis.com/css?family=Montserrat" src_type="url" rel="stylesheet" type="text/css" />
It wont work without additional parameters.
Google fonts used in our tutorial for Slider Revolution: How to insert HTML slider in Magento 2
Another case is when you want to specify font subset like &subset=latin,cyrillic. The solution is Replacing ampersand in the path with
The problem seems that the xml code is escaped three times. If it does not work for you, try adding or removing the amp; part as many times as needed until it works.
Check github thread for complete information on this issue – https://github.com/magento/magento2/issues/2228
One thought on “Magento 2: How to add Google Font”
this will be added to magento 2 official doc