mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.22k stars 9.82k forks source link

[Bug]: Japanese vertical punctuation error #18384

Open Redv123 opened 5 days ago

Redv123 commented 5 days ago

Attach (recommended) or Link to PDF file

N9941ID.pdf

Web browser and its version

Firefox 127.0.02

Operating system and its version

Linux and Mac

PDF.js version

4.5.19 [790470c1a]

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

Open the PDF and scroll down to pages 3 and 5 to observe the punctuation.

What is the expected behavior?

Punctuation should appear as vertical punctuation.

What went wrong?

Punctuation marks are displayed in horizontal. 10 image

Link to a viewer

No response

Additional context

No response

calixteman commented 5 days ago

The wave dash (\u301C) has no vertical equivalent in Unicode (see https://en.wikipedia.org/wiki/Wave_dash). @Redv123, would you be able to create a small test case in HTML with some Japanese text in vertical mode and with this wave dash in order to see how it behaves in Firefox or Chrome ? About the horizontal bar (\u2015), we could map it on the vertical bar (\u007C).

Redv123 commented 5 days ago

The wave dash (\u301C) has no vertical equivalent in Unicode (see https://en.wikipedia.org/wiki/Wave_dash). @Redv123, would you be able to create a small test case in HTML with some Japanese text in vertical mode and with this wave dash in order to see how it behaves in Firefox or Chrome ? About the horizontal bar (\u2015), we could map it on the vertical bar (\u007C).

In vertical mode, both Firefox and Chrome correctly display the vertical dash without differences. image

Redv123 commented 5 days ago

I discovered other issues while testing on a Mac. In Chrome and Adobe Acrobat, the exclamation mark in vertical Japanese text is centered, rather than positioned at the right. The first picture shows the exclamation mark on the right which is probably a Linux problem. Screenshot 2024-07-04 at 9 58 15 AM