- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Fri, 30 Mar 2012 10:24:03 +0800
- To: fantasai <fantasai.lists@inkedblade.net>
- CC: WWW Style <www-style@w3.org>
(12/03/30 5:59), fantasai wrote: > On 03/29/2012 01:08 PM, Kang-Hao (Kenny) Lu wrote: >> >> 1. In a paragraph of Chinese text, 'text-space-collapse: discard;' can >> be used to drop extra spaces caused by text editors which think you can >> randomly insert spaces at an end of line in HTML. > > I think you're best off running a regex that removes trailing spaces in > that case; 'discard' might remove spaces that you wanted to keep. Might > I suggest > perl -pi -e 's/ +$//g' filename > ? :) I don't read Perl, but in any case, I heard that 'text-space-collapse: discard;' is mostly about fixing *existing content* and this is one such example. >> 2. I often write pages that mix English and Chinese. As no browsers have >> implement 'text-space' at the moment, I have to manually insert lots of >> non-semantic whitespaces between ideographs and non-ideographic letters >> to make the text more readable. Once browsers implement 'text-space: >> ideograph-alpha;', I should be able to combine 'text-space-collapse: >> discard' and some values of 'text-space' so that the spaces are dropped >> and then regenerated according to some CJK layout rules that I am not >> familiar with. > > Probably we should define text-space: ideograph-alpha to replace any > collapsible spaces that are at that boundary. I agree that this might work better than something as hacky as my solution. >> What are the other use cases? And how does U+200C matter with those? > > Arabic. You want to make sure that the words don't run together; that > they are shaped independently even if the spaces are removed. U+200B prevents words from running together too, although the horizontal advancement of these two are different in various situations. I think it would be helpful if some sample examples are analyzed. Otherwise, how do you know in these cases words should be shaped independently if the spaces are removed? Cheers, Kenny
Received on Friday, 30 March 2012 02:24:34 UTC