W3C home > Mailing lists > Public > www-style@w3.org > August 2004

Re: [css4-text] 'text-autospace' and French guillemets

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 8 Aug 2004 10:02:01 +0300 (EEST)
To: www-style@w3.org
Message-ID: <Pine.GSO.4.58.0408080951440.23321@korppi.cs.tut.fi>

On Sat, 7 Aug 2004, Etan Wexler wrote:

> Say that I have a fragment of text:
>
> «foo»
>
> In HTML and in XHTML, I can mark that up as
>
> <span class="Pi">«</span>foo<span class="Pf">»</span>
>
> ...and apply the CSS
>
> span.Pi { margin-right: 0.2ex; }
> span.Pf { margin-left: 0.2ex; }

Yes, to achieve correct appearance in French.

> Okay, so that's one solution. Or semi-solution.

The best practical approach I've seen so far, after considering different
alternatives ( http://www.cs.tut.fi/~jkorpela/html/french.html ).
(The real solution to this particular problem would be the introduction of
a nonbreakable fine space character into Unicode, so that the problem
could be handled at the character level, even in plain text. But it would
naturally be a very long process.)

> But it is cumbersome
> and doesn't work for markup languages which lack a "span"-like element
> type.

Indeed. Any approach that requires such extra markup won't become popular,
except perhaps when the markup would be automatically generated. People
might use it in contexts where adequate presentation is essential, but not
widely.

What about the approach of introducing a selector that matches each
occurrence of a given character (treated as a pseudo-element)?
It would relatively straightforward, and would help in situations where
you want to have a particular character rendered in a particular way
(e.g. to make sure, as far as possible, that the registered sign is
clearly visible - it has great variation between fonts). But would this
imply too high computational cost, when each character needs to be checked
against being potentially a pseudo-element with some rules? And someone
might wish to go beyond the simple idea and introduce selectors that match
each occurrence of a given _string_, and then regular expressions...

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Sunday, 8 August 2004 07:02:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:32 GMT