Add new font ttf file

Hey Guys,

I wanted to add new font and it is in .ttf file. I have add into the child theme >> out directory >> font and then I went to base.tpl. There I found “base_style” and “base_fonts”. Something like below which is commented…

 [{block name="base_fonts"}]
            <link href=',400,700,600' rel='stylesheet' type='text/css'>
            <!-- <link href='font/helveticaneue.ttf' rel='stylesheet' type='text/css'> -->

But it is not working…Is this the right way?? Or I should follow some more steps…


No, it’s not. You have to use absolute path.

Is it something like below??

 `<link href='out/child_theme_name/src/fonts/helveticaneue.ttf' rel='stylesheet' type='text/css'>`
'<link href='../fonts/helveticaneue.ttf' rel='stylesheet' type='text/css'>`

<link href='../fonts/helveticaneue.ttf' rel='stylesheet' type='text/css'>

Hello Mr. Vanilla,

I found out the solution and it is working for me. I missed creating css file for my font.ttf


1 Like