Re: [Justfont] CSS support for font collections

Chris Lilley <chris@w3.org> Tue, 25 October 2016 20:30 UTC

Return-Path: <chris@w3.org>
X-Original-To: justfont@ietfa.amsl.com
Delivered-To: justfont@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C416129556 for <justfont@ietfa.amsl.com>; Tue, 25 Oct 2016 13:30:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.331
X-Spam-Level:
X-Spam-Status: No, score=-2.331 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.431, SPF_HELO_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FaPlDz-vMc9y for <justfont@ietfa.amsl.com>; Tue, 25 Oct 2016 13:30:15 -0700 (PDT)
Received: from raoul.w3.org (raoul.w3.org [IPv6:2001:470:8b2d:804:52:12:128:0]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 24F241298B1 for <justfont@ietf.org>; Tue, 25 Oct 2016 13:30:14 -0700 (PDT)
Received: from 30-10-243.wireless.csail.mit.edu ([128.30.10.243]) by raoul.w3.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <chris@w3.org>) id 1bz8MQ-000ATs-1A; Tue, 25 Oct 2016 20:30:14 +0000
To: Ken Lunde <lunde@adobe.com>, "justfont@ietf.org" <justfont@ietf.org>
References: <3D28D2A0-A90A-4CC8-BB82-B6AAEFB93238@adobe.com>
From: Chris Lilley <chris@w3.org>
Organization: W3C
Message-ID: <63a04cc6-18d8-6374-71ed-b7565e492cfb@w3.org>
Date: Tue, 25 Oct 2016 16:30:11 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <3D28D2A0-A90A-4CC8-BB82-B6AAEFB93238@adobe.com>
Content-Type: multipart/alternative; boundary="------------FD6631C3A0DD2826A6DF1FB6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/justfont/hWP0QokxmTrBAMoDPd-79kRsed4>
Subject: Re: [Justfont] CSS support for font collections
X-BeenThere: justfont@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
Reply-To: "justfont@ietf.org" <justfont@ietf.org>
List-Id: "Font Top Level Media Type \(just font\) WG" <justfont.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/justfont>, <mailto:justfont-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/justfont/>
List-Post: <mailto:justfont@ietf.org>
List-Help: <mailto:justfont-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/justfont>, <mailto:justfont-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Oct 2016 20:30:19 -0000


On 2016-08-15 15:56, Ken Lunde wrote:
> All,
>
> Chris Lilley asked me to forward to this mailing list a point I made on the public-webfonts-wg@w3.org mailing list about indexing fonts in a font collection in the context of CSS.
>
> below is the specific two-paragraph excerpt:
>
>> The latter method will be more reliable, because it doesn't depend on the order of the fonts within the collection, which have the potential to change over time, especially if additional fonts are added. A good real-world example of this is the forthcoming HK (Hong Kong) support for Source Han Sans (Adobe) and Noto Sans CJK (Google) that will add HK versions of the fonts to the collection, both weight-specific and the Super OTCs. These additional fonts will not be appended, but rather inserted, at least for the Super OTCs.
>>
>> Come to think of it, this actually happened to the SuperOTCs in Version 1.002 when HW (half-width) fonts were added for Regular and Bold. They were inserted, not appended.
> In other words, font collections have the potential to change the relative ordering of the fonts, which would usually happen when fonts are added. This is in terms of their index values, and this has actually happened in at least one broadly-distributed collection, and there are plans in place for having this happen again.
This seems sufficient motivation to try and make the fragments more robust.

> I was told that the 'name' table plays little or no part in terms of how CSS deals with a font collection, which is unfortunate because that is the table which provides the most reliable (unique) name of a font, such as the name.ID=6 string.

The name.ID=6 string (Postscript name) is already used in CSS 3 Fonts, 
in the local() part of the src descriptor
https://drafts.csswg.org/css-fonts/Fonts.html#src-desc
although that discussion does not mention font collections.

However, if the locally installed version for the bold face of Foo can 
already be referenced in CSS 3 Fonts using
|src: local(Foo-Bold)|
then it hardly seems a stretch to extend that to point to the bold face 
of Foo which happens to be in a collection
|src: local(Foo-Bold)|
and also to point to a non-installed webfont which is a collection, like
|src: url(https://example.org/Bar.woff2#Foo-Bold)|

It is an open question whether the fragment syntax should allow 
Postscript names *as well* as number, or *instead of* number.

I think it is okay to allow both, as long as the name is searched for 
first. So if someone happens to have a font family called "7", with a 
single weight, the ambiguity of #7 is resolved by first searching for a 
name, then if that fails searching for a number.

On the other hand, just using the Postscript name is clearer and more 
self-documenting, maybe we don't need the numeric fragments at all?


-- 
Chris Lilley
@svgeesus
Technical Director, W3C Interaction Domain