Re: [css3-fonts] @font-face matching and font-style descriptor

On Tue, Sep 14, 2010 at 11:22 AM, John Hudson <tiro@tiro.com> wrote:
> John Daggett wrote:
>
>>> @font-face {  font-family: MyFont;
>>>  src: local(Arial);
>>> }
>>>
>>> @font-face {  font-family: MyFont;
>>>  src: local(Arial);
>>>  font-style:italic
>>> }
>>>
>>> @font-face {  font-family: MyFont;
>>>  src: local(Arial);
>>>  font-weight:bold;
>>> }
>
>> Right, this with an additional bold italic version will completely
>> eliminate the possibility of synthetic oblique/bolding.
>
> To confirm I understand this:
>
> Is this associating all the font-style and font-weight settings with a
> single @font-face font? So no matter what style or weight is spec'd in text,
> the same, 'regular' font is being used?

Well, not *all* settings.  It's setting the specific values of
font-style:italic and font-weight:bold.  If you want to cover more
possibilities you have to write more @font-face blocks.  Basically,
the effort required to say "don't synthesize for property X" is
identical to the effort required to say "use this particular face for
property X" (since that's exactly what you're doing.

Just covering bold and italic (and maybe bold&italic) should cover 99%
or so of use-cases, though.

~TJ

Received on Tuesday, 14 September 2010 18:36:09 UTC