Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using non-standard font in web pages? [closed]

Tags:

html

css

fonts

I have been told to create a website using a non standard font. The client has supplied the font file (in the .otf format). Is there any way I can have the text on the webpage show up in the specified font (non-web standard) ?

Is there any other alternative other than using sIFR ?

EDIT : How do i apply this @font-face only to a particular div ?

like image 292
YD8877 Avatar asked Dec 17 '22 08:12

YD8877


1 Answers

You can use the CSS @font-face declaration for this.

However, beware: not all browsers support the otf format.
You can use a tool such as FontSquirrel's Font-face Generator to convert the font into all the different formats you'll need. It'll even generate the CSS for you, which you'll then simply copy and paste into your project.

like image 93
Joseph Silber Avatar answered Feb 21 '23 00:02

Joseph Silber