Scroll

How To Add Google Font To The HTML MotoCMS template

Note: we can not guarantee that all 100% of Google fonts would be possible to add to your HTML template version due to some characteristics that do not depend on our system. Some, very rare exceptions may happen. This instruction will help you to add almost any Google Font you like.

 First of all you need to find the font you want to add here http://www.google.com/fonts/

And download it to you PC.

Then you should unzip the downloaded archive to get .ttf file. When it is done please follow this link in order to open "Online Font Creator"  which allows you to convert fonts to the .swf format.

Please add the Google font(s) you have downloaded and click 'Create Fonts' button.

After that compilation process will run and you'll be suggested to save the archive with a compiled font archive. 

 

Now you need to unzip this archive to get youfontname.swf file. Please upload this file with the font to your server's /fonts folder. After that please go to /xml/fonts.xml  file on and open it to edit with a text editor (we recommend you to use NotePad ++). Here you need to find a code of the font. It will look like this:

 <font enabled="true" isGoogle="true" regular="true" bold="true" italic="false" boldItalic="false">
    <name><![CDATA[Play]]></name>
    <file>Play.swf</file>
    <characters>Cyrillic, Cyrillic-extended, Greek, Greek-extended, Latin, Latin-extended</characters>
  </font>

</motoFonts>

Please copy this code and paste in the bottom of the file right before the tag </motoFonts>. Now you have 2 codes with the same font name. So you need to add the name of your font which you have added to /fonts folder. In order to do it please replace line:

<name><![CDATA[Play]]></name> 

with

<name><![CDATA[yourfontname]]></name> 

(example: <name><![CDATA[Dr Sugiyama]></name> )

and the line:

<file>Play.swf</file>

with

<file>yourfontname.swf</file>

(example: <file>DrSugiyama.swf</file> )

After that save the changes for in this file. Please open Fonts Manager in the admin panel your font should be there.

Have more questions? Submit a request

Comments