-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Kernings and trackings of vertical texts are incorrect #6387
Comments
Thank you @hakatashi - I found the reason and have written a fix. can we use your pdf as regression test? |
Absolutely no problem, if you don't mind the embedded font, Noto Sans CJK JP, are licensed under Apache license 2.0. |
According to the PDF spec, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
This issue is a regression from PR #4832. |
According to the PDF spec 5.3.2, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
I tried to fix that, it also applies to the text layer size (which i noticed is offset in this document as well) the fix is to use the vertical info to change the multiplication sign. PS: Am I the only one who thinks the spec doesnt make sense? why will a positive value make the text narrow on horizontal, but wider on vertical? |
According to the PDF spec 5.3.2, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
According to the PDF spec 5.3.2, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
According to the PDF spec 5.3.2, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
According to the PDF spec 5.3.2, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
According to the PDF spec 5.3.2, a positive value means in horizontal, that the next glyph is further to the left (so narrower), and in vertical that it is further down (so wider). This change fixes the way PDF.js has interpreted the value.
Fix text spacing with vertical fonts (#6387)
From my observation, kernings and trackings of vertical texts (in Japanese) are incorrect.
Test PDF: pdfjs-issue.pdf
(Generated by Adobe Illustrator CC pdfjs-issue.ai)
Adobe Acrobat Pro DC 2015.008.20082:

PDF.JS (of Firefox 40.0 Stable):

Preceding screenshots are taken in Windows 10 Japanese. OS X may have the same error.
The text was updated successfully, but these errors were encountered: