Reputation: 177
I used many English ttf fonts in my website and it worked very well, but when I try to do the same thing using Arabic ttf fonts it does't work, it works only if I used otf fonts which it isn't available too much compared to ttf. is there any way to make the Arabic ttf fonts works ?
I am using this code:
<style>
@font-face {
font-family: myFont;
src: url(moga.ttf);
}
div {
font-family: myFont;
}
</style>
Upvotes: 0
Views: 1781
Reputation: 22760
Your font from the jsFiddle works and displays correctly for me (in firefox 36), at least, it is arabic script, so I assume that's the desired result, although I can't understand it.
What browser are you using?
You need to ensure the font ttf is referenced correctly, you need to upload the ttf to the website and link to it, so for example only, if you are saving the ttf to /includes/fonts/CSDiwany4S_Inormal.ttf
then your CSS should look like this
@font-face {
font-family: myFont;
src: url("/includes/fonts/CSDiwany4S_Inormal.ttf");
}
div {
font-family: myFont;
}
And this will work. You have told me your font should look like this:
http://photoshop.cc/wp-content/fonts/arabic_fonts_img/horr/new/Tachkili%20Font%20TTF.gif (this is primarily for other westerners here who are seeing the original basic arabic font on the jsFiddle and are assuming that this is the intended output).
Upvotes: 2