W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css3-text] grapheme clusters across element boundary

From: Jonathan Kew <jonathan@jfkew.plus.com>
Date: Tue, 17 Jan 2012 08:40:29 +0000
Message-Id: <02323550-AA1B-4EDF-8E93-E9EFD1AD36D2@jfkew.plus.com>
To: www-style Style <www-style@w3.org>
On 16 Jan 2012, at 23:15, fantasai wrote:
> 
> Added:
>  | The rendering characteristics of a <i>character</i> divided by an
>  | element boundary is undefined: it may be rendered as belonging to
>  | either side of the boundary, or as some approximation of belonging
>  | to both. Authors should avoid dividing grapheme clusters by element
>  | boundaries.
> 
> How's that?

That appears to specifically _discourage_ examples such as colouring a diacritic differently from its base character, which is a use case that gets requested from time to time:

  <div style="font:18px Times">
    Careful authors use the spelling
    ‘na&#x131;<span style="color:red">&#x308;</span>ve’
    rather than
    ‘na&#x131;<span style="color:red">&#x307;</span>ve’.
  </div>

Support for this is currently quite limited (the above renders nicely in Gecko on OS X, where the Times font does not use precomposed glyphs for these combinations, but the colour is lost on a platform where Times is replaced by Times New Roman, for example); still, it seems unfortunate to tell authors that they shouldn't be attempting to do this at all, rather than just warning them that the desired rendering may not (yet?) be widely implemented.

JK
Received on Tuesday, 17 January 2012 08:41:01 GMT

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