Re: [csswg-drafts] [css-text] cursive shaping breaks needs better scoping

@svgeesus I believe your concerns are already handled by the current spec: https://www.w3.org/TR/css-text-3/#boundary-shaping

@r12a: Afaict, your list differs from the one in the spec in these respects:
    
    * don't break across borders (but do across margins/padding)
    * don't break due to changes in text-decoration
    * don't break due to first-letter styling
   * don't break due to font color, style, weight, etc.
   
The first case, I disagree with. Borders and padding must be treated the same way. If you want to draw a box around a character without affecting anything, use 'outline' instead.

The second case, we should clarify. Done in https://github.com/w3c/csswg-drafts/commit/5b26dfb9655b7963b9809854b96d2028954fed63 .

The third case, :first-letter should be treated the same as any other inline box, and should already be covered by this statement: "Text shaping must not be broken across inline box boundaries when there is no change in formatting.". If your'e talking about an element with 'initial-letter' formatting, that's covered in the spec for 'initial-letter', see https://drafts.csswg.org/css-inline-3/#initial-letter-shaping

The fourth case really needs to be limited by the font technology. A color change partway through a ligature is not likely to work out. Switching font styles ends the text run, and if the platform doesn't offer an API to pass in context (like Harfbuzz was recently updated to do), then trying to get contextual shaping to do will not be possible and trying to hack it by clipping rendered text that includes the context would be crazy. Arabic shaping is a much simpler sort of contextual shaping in the sense that we can easily force the renderer to give us initial/medial/final/isolated forms as required, but in more calligraphic fonts we won't be able to maintain the shaping across font changes in any reasonable way.

So afaict the only thing that should change here is clarifying text decoration, and maybe giving some examples of what's reasonable vs. not.

Let me know if that's acceptable.

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

Received on Monday, 15 October 2018 05:53:06 UTC