Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-text-decor] text-decoration-skip: ink should allow not to skip for CJK and certain ideographic scripts #707

Open
kojiishi opened this issue Nov 14, 2016 · 10 comments
Labels
css-text-decor-4 i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.

Comments

@kojiishi
Copy link
Contributor

kojiishi commented Nov 14, 2016

Currently we're considering implementing text-decoration-skip: ink, and investigating what to do with CJK.

  • CJK does not want to skip ink in general.
  • Blink has not implemented heuristics to draw underlines to under position for CJK yet, and therefore underlines have high possibility to overlap with glyphs.

Implementing text-underline-position: auto to draw at under position for CJK is one way to solve this, and we're investigating this option.

The other option, we found WebKit does not skip ink for characters in CJK and Linear B ideogram blocks.

This might make sense since when font-size is small, no matter what we do, there may be overlaps.

On the other hand, some special fancy CJK fonts such as Kazuraki may want to skip ink.

I haven't come to the conclusion yet, but should the text-decoration-skip: ink allow not to skip for some scripts or under certain conditions? I mean I think it should, though I'm not clear how to define it properly yet.

Thoughts?

cc @litherum @fantasai @drott @masayuki-nakano @dbaron @upsuper @r12a

@kojiishi kojiishi added the css-text-decor-3 Current Work label Nov 14, 2016
@litherum
Copy link
Contributor

It should definitely be left up to the UA. The UA knows the environment where the page is being viewed (such as location) as well as any context the page has already provided (such as lang attribute).

If there are additional signals that web authors may want to declare to control skipping, the current syntax can be extended in the future. However, the default behavior should be to let the UA do the right thing.

@upsuper
Copy link
Member

upsuper commented Nov 15, 2016

I have a slightly different but maybe related question: should text-decoration-skip: ink applied on decoration lines other than underline, namely overline and line-through?

@kojiishi
Copy link
Contributor Author

@litherum than you, so something like "UA may decide not to skip for certain scripts such as ideographs or under condition where UA determines is appropriate not to skip. Future CSS may provide additional controls for such behavior if desired"?

@upsuper that's really a good question, I don't know the answer from top of my head. Probably worth an issue by itself?

@upsuper
Copy link
Member

upsuper commented Nov 15, 2016

Filed #711.

@r12a r12a added the i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. label Nov 17, 2016
@yisibl
Copy link
Contributor

yisibl commented Nov 21, 2016

Yes, I think CJK does not want to skip ink in general.

At present, the realization of Blink is very strange:
image

@yisibl
Copy link
Contributor

yisibl commented Nov 21, 2016

For special CJK fonts(Kazuraki), I do not know whether the specification is not supposed to add a new attribute that allows the developer to define the behavior of the ink itself.

@fantasai
Copy link
Collaborator

This seems like more of a case for adjusting the position of the underline, which the UA is already allowed to do, than fixing the ink-skipping rules... If the underline is too close to the CJK glyphs, it already looks bad, even if we turn off skipping. Another thing that is under control of the UA is how much ink to skip: it looks like rather too much skipping in the screenshot.

Personally, I don't think there is anything to fix in the specs here. Blink just needs a better implementation of the existing spec.

@kojiishi
Copy link
Contributor Author

>This seems like more of a case for adjusting the position of the underline

I think that's different topic.

  • CJK characters may use up to full em-box, while underline should be drawn at the bottom of em-box, so this could happen even with underline-position: under, especially in small digital fonts,
  • Skipping ink looks like cheap fancy supermarket advertisement in CJK typesetting tradition.

@fantasai
Copy link
Collaborator

The UA can pull the underline below the em-box if necessary. There is no restriction on the position. Afaict it will look bad if it overlaps, whether or not ink is skipped, no?

In any case, if for some reason the underline is positioned to overlap (e.g. author sets text-underline-offset to create this overlap), then the ink-skipping, if specified, should be honored.

@kojiishi
Copy link
Contributor Author

kojiishi commented Jan 7, 2017

It's hard to explain in short, but position and skipping are two independent issues. Positioning can mitigate skipping ink issue by making the interceptions very rare though.

I think this discussion is very similar to the one about line-through #711; when author says "skip ink", should we skip ink regardless of how sane it is, or should we interpret "improve typography by skipping ink, but don't skip ink if insane."?

I think we prefer the latter, and let UA be smart enough to know when to skip and when not to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-text-decor-4 i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
Projects
None yet
Development

No branches or pull requests

7 participants