Re: [css3-fonts] humane 'unicode-range'

On 1 May 2011, at 19:15, Phillips, Addison wrote:

> Hi Koji,
> 
> I don't think adding this to "unicode-range" makes sense. The 'unicode-range' selector is one specific, effective mechanism for one specific use--selecting font based on a range of Unicode code points.

I don't think I agree with you on this. The point of the unicode-range descriptor in @font-face is to control which characters a particular font is used to render; but selecting on the basis of the actual numeric values of Unicode codepoints is not necessarily the most useful way to express this.

ISTM that Koji is in effect asking for alternative ways to express "a range of Unicode code points", so as to avoid the necessity to look up the precise Unicode values of interest - which in many cases will not be a single contiguous range, but rather several ranges.

Personally, I'd like to see ways to express the "ranges" of interest for unicode-range in terms of various properties defined in the Unicode character database, in a similar way to the use of properties to express character classes in Unicode regexps, as an alternative to cumbersome [....] expressions.

JK

> 
> If we want to provide for selection according various Unicode properties, we should provide a property selector.
> 
> Addison
> 
> Addison Phillips
> Globalization Architect (Lab126)
> Chair (W3C I18N WG)
> 
> Internationalization is not a feature.
> It is an architecture.
> 
> 
>> -----Original Message-----
>> From: public-i18n-cjk-request@w3.org [mailto:public-i18n-cjk-request@w3.org]
>> On Behalf Of Koji Ishii
>> Sent: Sunday, May 01, 2011 4:35 AM
>> To: John Daggett; Christoph Päper
>> Cc: CSS WWW Style; CJK discussion (public-i18n-cjk@w3.org)
>> Subject: RE: [css3-fonts] humane 'unicode-range'
>> 
>> This is in reply to a little old thread as this was marked as an issue in the
>> spec[1].
>> 
>> One use case that came up in my mind is to switch fonts for UAX #11 [2]
>> EAW=A code points.
>> 
>> EAW=A contains mostly punctuation and symbols that were unified. I think
>> there are cases where authors want:
>> * CJK fonts for EAW=A|F|H|W
>> * Latin fonts for EAW=N|Na
>> 
>> One famous example for EAW=A is U+2026 HORIZONTAL ELLIPSIS; ellipsis are
>> at baseline in Latin fonts while ellipsis at the vertical center in CJK fonts. If I
>> were writing Japanese documents, I expect it be drawn at the vertical center.
>> 
>> It would be great if I can use a font like this:
>> 
>> @font-resource {
>>  font-family: myfont;
>>  src: local(CJK-font-name);
>> }
>> 
>> @font-resource {
>>  font-family: myfont;
>>  src: local(Latin-font-name);
>>  unicode-range: EAW=N|Na;
>> }
>> 
>> Or to do this in opposite way:
>> 
>> @font-resource {
>>  font-family: myfont;
>>  src: local(Latin-font-name);
>> }
>> 
>> @font-resource {
>>  font-family: myfont;
>>  src: local(CJK-font-name);
>>  unicode-range: EAW=A|F|H|W, U+5C;
>> }
>> 
>> Thoughts?
>> 
>> [1] http://dev.w3.org/csswg/css3-fonts/#unicode-range-desc
>> [2] http://unicode.org/reports/tr11/
>> 
>> 
>> Regards,
>> Koji
>> 
>> -----Original Message-----
>> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
>> Behalf Of John Daggett
>> Sent: Thursday, June 17, 2010 6:06 PM
>> To: Christoph Päper
>> Cc: CSS WWW Style
>> Subject: Re: [css3-fonts] humane 'unicode-range'
>> 
>> 
>> 
>> Christoph Päper wrote:
>> 
>>> Would it make sense to add keywords to ‘unicode-range’ or to add
>>> another font-decriptor with similar purpose to identify scripts or
>>> writing systems (i.e. script + language) supported by (and requested
>>> to be used from) the font resource?
>> 
>> There was a discussion of this last year:
>> http://lists.w3.org/Archives/Public/www-style/2009May/0212.html
>> 
>> I think it boiled down to whether to use names from the Unicode database or
>> not and if so, how specific the names should be.  I think the idea of named
>> ranges for the 'unicode-range' descriptor is interesting.
>> I don't like the idea of additional descriptors for this (e.g. script-coverage, etc.).
>> 
>> It would help to have a clearer idea of the use case you imagine for this to be
>> able to judge whether named ranges are better than simple ranges.
>> 
>> One other use I can imagine is for easily dividing up large CJK fonts into defined
>> character ranges.
>> 
>> Ex:
>> 
>>  unicode-range: jis-level-1, jis-level-2; /* alias for the set of codepoints in the
>> JIS Level 1 and 2 ranges */
>> 
>> JIS Level 1 characters occur more commonly than JIS Level 2, etc., so this would
>> be a convenient way for font vendors to package fonts so that fonts containing
>> infrequently used characters were only downloaded in fallback situations.
>> 
>> No matter what the set of aliases, I think we can only practically reference
>> ranges that are defined clearly and have a standard reference point such as the
>> Unicode database.
>> 
>> Cheers,
>> 
>> John Daggett
> 

Received on Sunday, 1 May 2011 19:03:00 UTC