Closed Bug 1941096 Opened 10 months ago Closed 9 months ago

Remove newline around U+FF5E instead of replacing it with space in Japanese/Chinese documents

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 135
All
Unspecified
defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: tats.u, Assigned: jfkthame)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0

Steps to reproduce:

https://codepen.io/tats-u/pen/GgKxpyE

Actual results:

Extra spaces around the first ~ (U+FF5E) in the first line

Expected results:

The 2 line has the same visual

About FF5E:

https://www.compart.com/en/unicode/U+FF5E
https://github.com/prettier/prettier/pull/16832

  • East Asian Width: F
  • Category: Sm

Fix:

https://github.com/mozilla/gecko-dev/blob/29e186485fe1b835f05bde01f650e371545de98e/intl/unicharutil/util/nsUnicharUtils.cpp#L524-L525

 bool IsEastAsianPunctuation(uint32_t u) {
   return intl::UnicodeProperties::IsEastAsianWidthFHW(u) &&
-         intl::UnicodeProperties::IsPunctuation(u);
+         (intl::UnicodeProperties::IsPunctuation(u) || u == 0xff5e);
 }
Hardware: Unspecified → All
See Also: → 1935148

Thanks for the report & the suggested patch!

I'm hoping this is in jfkthame's wheelhouse, given that he worked on similar bug 1935148.

Severity: -- → S3
Flags: needinfo?(jfkthame)
Assignee: nobody → jfkthame
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a55665fe1fc2 Treat FULLWIDTH TILDE as CJK punctuation for segment break transformation purposes. r=dshin
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/50388 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Upstream PR merged by moz-wptsync-bot
See Also: → 1950321
Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: