0

When using an arabic font with @fontfoce rule, something strange happens: when it comes to Roman characers, almost all the browsers (except Opera) does not use the Roman charset of the font and instead they use the charset of the other fonts declared in the font-family property. Let's illustrate it. Here's my @fontface rule:

@font-face {
    font-family: 'hasoobCM';
    src: url('/media/fonts/hasoob.eot'); /* IE9 Compat Modes */
    src:url('/media/fonts/hasoob.eot?#') format('eot'),    
          url('/media/fonts/hasoob.woff') format('woff'),
          url('/media/fonts/hasoob.ttf') format('truetype'); 
}

And, here is the font declaration:

.hasoob { font-family: hasoobCM, Georgia, "Times New Roman"; }

Now, the Roman characters of the text will be that of Georgia and not hasoobCM.

And the funny part is, if I declare the font as .hasoob { font-family: hasoobCM; }, then the problem is sovled and the characters render correctly. The problem is that I can not do that, because of inconsistency of the font-sizes.

So, what should I do to "force" the browsers to use all the charset of my font?

BTW, there is a unicode-range in the @fontface rule, but I don't know the exact full charset range of my font, and I'm not sure whether that will solve the issue or not.

Josh Crozier
  • 233,099
  • 56
  • 391
  • 304
Iryn
  • 255
  • 2
  • 5
  • 13
  • You need to provide more information. Where does this font come from, and how did you create the different font formats? Software used to generate them often defaults to including “Western European” characters only, so the question would rather be why Opera (which version? platform?) shows something else. You should provide complete code that produces the problem, or a URL of a page demonstrating that, preferably both. – Jukka K. Korpela Aug 28 '13 at 17:26
  • @Jukka Please see [http://stackoverflow.com/q/18549923](http://stackoverflow.com/q/18549923) – Iryn Aug 31 '13 at 20:21
  • the other question you have posted does not answer any of my questions. – Jukka K. Korpela Aug 31 '13 at 20:26
  • @Jukka: It's kind of an unprofessional font that is (rather) widely used. The different formats have been created by [onlinefontconverter](http://onlinefontconverter.com/). I don't know why opera act the desired way. I can not provide any link, because it's on localhost. I think what I have written is the complete code. – Iryn Aug 31 '13 at 21:08

0 Answers0