RE: [css3-text] feedback on 'word-break: keep-all;'

>>> But since we are talking about CJK here, I *think* I have asked this
>>> same question before too, but maybe I should ask again: Suppose we
>>> have the following example sentence:
>>>
>>> 我們今次的例會邀請到陳大文教授講解公共交通的重要性。
>>>
>>> and we want the following (where each • denotes a possible break point):
>>>
>>> 我們•今次•的•例會•邀請•到•陳大文教授•講解•公共交通•的•重要性。
>>>
>>> I expect keep-all to be able to accomplish this, but for some reason I
>>> remember being told that this is not in fact the case. The explanation
>>> in http://dev.w3.org/csswg/css3-text/ seems to neither confirm nor
>>> deny this. Is clarification needed for keep-all, or have I missed
>>> something obvious?
>>
>> Suppose you have a segmentation program that can insert zwsp(s) at word
>> boundaries well, you could do that as a preparatory step and you should
>> be able to keep words from breaking with 'word-break: keep-all'.

This should work, and

> What if we applied word-break: keep-all to just a few selected
> parts of the sentence (say just to prevent the personal name
> from breaking)? I would expect that to work (without any zwsp).
> If that’s not supposed to work then I think the text for explaining
> keep-all would need a fair bit of rewriting. 

Yes this is supposed to work too.

I don't remember you asked last time, sorry about that, it doesn't work if you just apply word-wrap to whole sentence, but either of above should work. For latter case, you should also be able to do this by the text-wrap property or the white-space property.


Regards,
Koji

Received on Monday, 7 May 2012 18:35:18 UTC