Using Custom Fonts

Using the right font can make a website more attractive and easy to read. Custom font is useful for changing the font according to what you want.

How do you change the font ?

This document contains detailed instructions to add more custom blocks

  1. Download the theme code
  2. Edit Style.css
  3. Edit manifest.json
  4. Edit document_head.hbs
  5. Import new theme file to Zendesk

Download the theme code

  • In the Guide Admin section, navigate to the theme workbench.
    mceclip0.png
  • Click on the theme settings icon, and choose Download. This will download the theme zip file.
    mceclip1.png
  • Extract the .zip file into a folder.
    mceclip2.png
  • Open Youth Foldermceclip8.png
  • Go to Assets
    mceclip9.png
  • And put your font file  in the assets folder (here I use the example of the dalfitra font)
    mceclip10.png

Edit Style.css file

  • Once extracted open the folder theme file with your code or text editor app such as Notepad or Notepad++. In our example, we're using Visual Studio Code
    mceclip3.png
  • Locate style.css and open it
    mceclip1.png
  • Enter the code below above the @media code. and change your_font to the name of the font you want.
    @font-face {
      font-family: 'your_font';
      font-style: normal;
      font-weight: 400;
      src: local('your_font'), url("{{asset 'your_font.woff'}}") format('woff');
    }

    mceclip2.png

Edit manifest.json file

  • Locate manifest.json and open it
    mceclip3.png
  • Find text font with Ctrl+Fmceclip4.png
  • The custom font code is inside { }, so you should copy all the code inside and paste it below :mceclip5.pngmceclip6.png
  • then replace the word in the " " sign with your font name
    mceclip7.png
  • {
    "label": "your_font",
    "value": "'your_font',your_font_type"
    },

Edit document_head.hbs file

  • Locate document_home.hbs in templates folder and open itmceclip11.png
  • Copy paste the code inside {{#issettings.body_font_family"'your_font', your_type_font"}} and end with {{/is}} and replace it with your font url 
    mceclip12.png
    mceclip13.png
    mceclip14.png
  • {{#issettings.body_font_family"'your_font', your_font_type"}}
        <linkhref='your_font_url' rel='stylesheet'>
    {{/is}}
  • Go back to Youth folder select all the items there and then add it to archive.
    mceclip20.png
  • Set the format to .zip
    mceclip21.png

Import the new theme file to Zendesk

  • Drag the youth.zip or yourtheme.zip to Zendesk Guide theme workbench.
    mceclip22.png
  • Drag and drop it here.
    mceclip24.png
  • Once loaded, you can configure the settings and make it your live theme.
    mceclip25.png
  • Now you have added a Custom Font
    mceclip16.png
    mceclip17.png

 

 

Previous
Next
13342812396692

Comments

0 comments

Article is closed for comments.

Didn't find what you were looking for?
Submit a request
Community

Was this article helpful?

0 out of 0 found this helpful
Powered by Zendesk