Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css font-face with the Arabic fonts

Tags:

css

font-face

I'm trying to use an Arabic external font:

@font-face {
    font-family: "My";
    src: url(GE_SS_TV_Bold.otf) format("truetype");
}
p.customfont { 
    font-family: "My", Verdana, Tahoma;
}

It's appearing like this: enter image description here but it should appear like:enter image description here

like image 906
Mostafa Elkady Avatar asked Feb 08 '11 01:02

Mostafa Elkady


People also ask

What is font face CSS?

The @font-face CSS at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.

Which font is used for Arabic?

Arabic. Times New Roman* and Arial* are standard, professional fonts used in print and are legible for beginning Arabic learners.


1 Answers

hmmm… what is the browser you are using, what is the operating system your are using. Font Faces have different rendering depending on the platform/software.

Also in your document you seem to mix truetype and opentype ;) otf = OpenType Font, ttf = TrueType font usually. What about if you rewrite like?

@font-face {
    font-family: "My";
    src: url(GE_SS_TV_Bold.otf) format("opentype");
}

if you need one font in different formats and you have the files

@font-face {
    font-family: "My";
    src: url(GE_SS_TV_Bold.otf) format("opentype"),
    src: url(GE_SS_TV_Bold.ttf) format("truetype");
}
like image 152
karlcow Avatar answered Sep 23 '22 08:09

karlcow