W3C home > Mailing lists > Public > www-style@w3.org > December 2011

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

From: Jonathan Kew <jonathan@jfkew.plus.com>
Date: Mon, 12 Dec 2011 21:22:37 +0000
Cc: <www-style@w3.org>
Message-Id: <498ACDDD-6F7A-4D7B-AD42-1B33EEB6B19F@jfkew.plus.com>
To: "<tao.yu@nokia.com>" <tao.yu@nokia.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT