Jump to content

Custom Font


manix

Recommended Posts

Hey,

 

I googled that topic just about now and found a tutorial that seemed to be pretty accurate but too complicated at the same time so I couldn't understand much. My next option is asking you ^^

 

How can I have a custom font in my website ? Obviously the user has to download it the first time he loads the site, but how do I do that?

Link to comment
https://forums.phpfreaks.com/topic/241443-custom-font/
Share on other sites

<br />
@font-face {<br />
    font-family: "Custom Font";    /*  This is what you name your custom font  */<br />
    src: url(custom-font.ttf);    /*  This is where you put the path to your font  */<br />
}<br />
.customtext {<br />
    font-family: "Custom Font";    /*  This is how you apply the font.   */<br />
    color:red;<br />
}<br />

Link to comment
https://forums.phpfreaks.com/topic/241443-custom-font/#findComment-1240256
Share on other sites

@font-face {
    font-family: "Fonta";
    src: url(Fonta.ttf);
}

a.navmenu:link,a.navmenu:visited {
font-family: Fonta;
...
}

<li><a class="navmenu" href="home.php">Начало</a></li>

 

and it worked perfectly with the first font I used (placed the 'Fonta.ttf' in the htdocs) and then I downloaded another one and just replaced the old one and it's not working anymore..

 

ps. the font has cyrillic characters if that's what you're thinking the problem is

Link to comment
https://forums.phpfreaks.com/topic/241443-custom-font/#findComment-1240284
Share on other sites

Get your font file, upload it to Font Squirrel.

 

Its really good and exports your font into all web formats.

 

It gives you a download zip with everything in it to copy and paste into your css/html.

 

http://www.fontsquirrel.com/fontface/generator

 

Or keep the font face and convert it to Cufon. http://cufon.shoqolate.com/generate/

 

As another option, Works a treat for me :D

Link to comment
https://forums.phpfreaks.com/topic/241443-custom-font/#findComment-1242208
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.