Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.