Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install a Font in server

Tags:

html

css

I have downloaded and installed a font in my system, then i used this font in my project, its worked fine in local system, but when i upload this page to server its not working. How can i install a font in server? or How can i solve this issue?

Please Help me!!!!

like image 785
user434770 Avatar asked Oct 16 '10 05:10

user434770


People also ask

How do I manually install a font?

Right-click the fonts you want, and click Install. If you're prompted to allow the program to make changes to your computer, and if you trust the source of the font, click Yes. Your new fonts will appear in the fonts list in Word.

How do I install a TTF file?

To install the TrueType font in Windows:Click on Start, Select, Settings and click on Control Panel. Click on Fonts, click on File in the main tool bar and select Install New Font. Select the folder where the font is located. The fonts will appear; select the desired font that is titled TrueType and click on OK.


1 Answers

With CSS3 it is possible to embed fonts on websites even if it isn't available on the user's machine.

First upload your font to a directory on your server.

Then register that font in your CSS so that you can use it like so:

@font-face {
 font-family: 'Raspoutine Medium';
  src: url(http://site/fonts/Raspoutine Medium.ttf);
}

Then, to use it on elements within your site:

body {
font-family: 'Raspoutine Medium', Arial, Helvetica, san-serif;
}

(see http://www.w3.org/TR/css3-fonts/#the-font-face-rule)

Note that this will only work in select modern browsers, namely current versions of Firefox, Chrome, Safari, Opera, and IE9. IE8 and older versions of IE don't support this so it's good to declare and test the site with a 'fall back' font.

Also note that there may be licensing issues depending on the font..

like image 114
flight643 Avatar answered Sep 18 '22 07:09

flight643