Re: [css-text] 'hanging-punctuation' comments

On 11/13/13 1:26 PM, "Kang-Hao (Kenny) Lu" <kanghaol@opera.com> wrote:
>Why is that "," in
>
>>>  |我要,|   ('text-align' is 'left')
>>>  |吃飯。|
>
>not at the end edge? And why is this "," in
>
>    |我  要|, ('text-align' is 'justify')
>    |吃飯。|
>
>at the end edge?

Both are at the end edge.

To determine the line break, UA adds characters until it doesn't fit to
the width.
1. 我要 -- Width is 2em, Still fits to 3em
2. 我要, -- Width is 2em, still fits to 3em

   Note that at this step, the comma is at end edge, so it's not measured.
3. 我要,吃 -- Width is 4em, doesn't fit, so break at #2
   Note that at this step, the comma is NOT at the end edge, so it's
measured.

Does this make sense?

/koji

Received on Wednesday, 13 November 2013 09:36:37 UTC