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

Text-decoration-line should not be skipped at ideograph-alpha/numeric text spacing #1061

Closed
MurakamiShinyu opened this issue Dec 13, 2022 · 5 comments · Fixed by #1063 or #1436
Closed
Assignees
Labels
Milestone

Comments

@MurakamiShinyu
Copy link
Member

Test sample:

<style>
h1 {
  text-decoration: underline;
  text-spacing: auto;
}
</style>
<h1>漢字Abc 123かな</h1>

Test with Vivliostyle Viewer:
https://vivliostyle.vercel.app/#src=data:,%3Ch1%3E%E6%BC%A2%E5%AD%97Abc%20123%E3%81%8B%E3%81%AA%3C/h1%3E&style=data:,/*%3Cviewer%3E*/%0A/*%3C/viewer%3E*/%0Ah1%20%7B%0A%20%20text-decoration:%20underline;%0A%20%20text-spacing:%20auto;%0A%7D

Result screenshot:
Screenshot 2022-12-13 at 21 42 15

In this test result, the underline is skipped at spaces created by text-spacing: auto (ideograph-alpha and ideograph-numeric are enabled). This looks not good.

@MurakamiShinyu
Copy link
Member Author

この不具合が再発生しているので、reopenします。原因は PR #1412 で次のissueに対処しようとしたためでした。

@MurakamiShinyu
Copy link
Member Author

Test with Vivliostyle Viewer (v2.30.7):
https://vivliostyle.github.io/viewer/v2.30.7/#src=https://raw.githack.com/vivliostyle/vivliostyle.js/master/packages/core/test/files/text-spacing/text-spacing-ja.html&style=data:,/*%3Cviewer%3E*/%0A/*%3C/viewer%3E*/%0Ap%20%7B%0A%20%20text-decoration:%20underline;%0A%7D

Screenshot 2024-12-26 10 49 32

このテスト結果を見ると、和欧文間スペース(text-spacing:none以外の場合の "ABC-123" の前後)のほか、次の問題があることがわかる:

  • text-spacing:auto(trim-bothと同じ)の場合、行末の近くの閉じ括弧("〉は")で下線が途切れている
  • text-spacing:auto(trim-bothと同じ)の場合、行頭の開き括弧("〈")の下線が行頭にはみでている

@MurakamiShinyu
Copy link
Member Author

  • text-spacing:auto(trim-bothと同じ)の場合、行頭の開き括弧("〈")の下線が行頭にはみでている

これについては別issueにする:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment