W3C home > Mailing lists > Public > www-style@w3.org > October 2015

Re: [css-fonts] font-weight-adjust

From: Jonathan Kew <jfkthame@gmail.com>
Date: Wed, 21 Oct 2015 12:37:58 +0100
To: Florian Rivoal <florian@rivoal.net>
Cc: www-style@w3.org
Message-ID: <56277916.2020002@gmail.com>
On 21/10/15 12:28, Florian Rivoal wrote:

>> I'm not sure there's a problem here, is there? If the weights of
>> MyFallback are all in the same font file (e.g. a .TTC collection),
>> you'll need to specify which of the weights you want loaded
>> (regardless of which weight-mapping approach is used), so just do
>> that here:
>>
>> @font-face { font-family: my-favorite-font; font-weight: 400; src:
>> url(MyFavorite.woff), url(MyFallback.ttc#1); } @font-face {
>> font-family: my-favorite-font; font-weight: 600; src:
>> url(MyFavoriteBold.woff), url(MyFallback.ttc#3); }
>>
>> or something like that. (OK, I'm not sure that any browser has yet
>> implemented support for fragment identifiers to select faces out of
>> .TTC collections. But in principle, this should work. And I suspect
>> getting implementers to support this will be easier than getting
>> support for new font-weight-adjust property.)
>
> I was not aware of this possibility, and I agree it would solve the
> problem. Are specifications already clear about this, or is it
> something we should write down?

See CSS Fonts 4.3:

"...container formats that can contain more than one font must load one 
and only one of the fonts for a given @font-face rule. Fragment 
identifiers are used to indicate which font to load."

http://www.w3.org/TR/css3-fonts/#src-desc

JK
Received on Wednesday, 21 October 2015 11:38:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:57 UTC