Re: [css3-fonts] what is the right font "family-name"?

On 12 Dec 2011, at 21:10, <tao.yu@nokia.com> <tao.yu@nokia.com> wrote:

> Hi,
>  
> I have a question for “font-family” property.  For some fonts, I don’t know what  the right “family-name” should be used in CSS.  For example, font “Arial Bold”.  On Win7, it has font name “Arial Fett” (“Fett” is a German word).  If I use “Arial Fett” in the CSS file like (font-family: "Arial Fett";),  it does not work.

In which browser?

According to http://www.w3.org/TR/css3-fonts/#font-family-prop, "Some font formats allow fonts to carry multiple localizations of the family name. User agents must recognize and correctly match all of these names independent of the underlying platform localization, system API used or document encoding."

However...

>  But if I use “Arial Bold” (font-family: "Arial Bold";), then it works ok.

...this shouldn't work anyway. "Arial Bold" is not a font family name, it's a face name. The family is "Arial"; to specify the Bold face in the Arial family, you should use something like "font-family: Arial; font-weight: bold".

>  So my question are: 1) which “family-name” should be used?  2) how do I find out the right “family-name” for a standard .ttf  font (example, timesbd.ttf)?
>  
> Thanks,
> -Tao
> 
> 

Received on Monday, 12 December 2011 21:23:15 UTC