View Full Version : Mind Bending CSS Font Anomaly

07-27-2007, 11:10 AM
okay, I was working on a bit of hebrew code, and I found a set of fonts (Semitic Early, Semitic Middle, Semitic Late and Semitic Modern) that only work with a font face tag and *not* with a font-family css style. This only occurs in FireFox, IE works fine. Linux has a totally different issue - the set of four fonts get mashed up together into a font called Picto Hig ... hmm.

<p style="font-family: 'Times New Roman', serif;">Working With CSS</p>
<p style="font-family: 'Semitic Early', serif;">Not Working With CSS</p>
<p><font face="Semitic Middle">Working With HTML</font></p>

You can see an example of what is and isn't working above.

Does anyone know what is causing this?

I'm assuming right now that it's the font files themselves, but I didn't think that it was possible to create a font that won't show up with css!

You can get the problem fonts on this page: http://www.ancient-hebrew.org/14_ahrcfonts.html

07-27-2007, 11:17 AM
Firefox sometimes doesn't read all of the fonts on the system. I notice in your last line you use Semitic Middle but in the 2nd line you use Semitic Early. TBH neither font will likely work because if they aren't installed in the user's system their is no point as they won't see your special font.

07-27-2007, 11:30 AM
Oops, I forgot to change the Middle one back - well, none of them work, either way.

Normally I wouldn't use a weird font at all, but the page I'm working on is made for people who most likely already have these fonts installed. It's a page where you type in the hebrew words you want, and then choose the font you want it in. A little PHP script then takes what they typed and outputs it in the scrambly way the fonts were put together. It's nice for all of us without a hebrew keyboard :-)

07-27-2007, 09:03 PM
Are you sure you are using UTF-8 for the page so that the characters can be recognised properly?

07-28-2007, 12:11 AM
Stephen, it "works" the same if I append <?xml version="1.0" encoding="UTF-8"?/> to the top of the page.

This might be relevant - if I specify an xHTML or HTML 4 doctype (any type), even the font tag doesn't set the font.

I'm thinking this is just a quirk with Firefox... Kinda sad.