Re: [csswg-drafts] [css-text-3] Segment Break Transformation Rules for East Asian Width property of A (#337)

I presume the reason we're discussing heuristics at all, and not simply adding another value to `text-space-collapse` in [css-text-4](https://drafts.csswg.org/css-text-4/#propdef-text-space-collapse) which says "collapse segment breaks to nothing" is because (like https://github.com/w3c/csswg-drafts/issues/4576) this behaviour is supposed to be context-dependent - i.e. it depends on the characters on either side?

And the intention is, roughly, if the segment break is between two CJK ideographs, or between a CJK ideograph and punctuation, collapse it to nothing?

I ask because - if this behaviour must remain context-dependent - I'm wondering if it would be easier to add a value to `text-space-collapse` to turn this behaviour on, and instead list the contexts where it _wouldn't_ apply. So make the rule "if this flag is on, collapse all segment breaks _except_ those either side of characters of class (AL|HL|SA)".

Alternatively: it looks like Gecko is currently collapsing segment breaks between two ideographs, but not between ideographs and punctuation, and Blink/Webkit are doing neither. Perhaps segment breaks could always collapse between two ideographs (an easy and unambiguous test for UAX#14 class ID), but only collapse according to the more complex heuristics if the appropriate property was set? In other words, "always collapse segment breaks between ID characters. Only collapse other (some? all?) segment breaks if `text-space-collapse: collapse-break` is set"

(both of these are attempts to reduce both the processing cost of evaluating the heuristic, and the cost of getting the heuristics wrong).

-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/337#issuecomment-591403692 using your GitHub account

Received on Wednesday, 26 February 2020 12:34:47 UTC