-
Notifications
You must be signed in to change notification settings - Fork 244
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
Font rendering with vertical text #890
Comments
Can you post the input SVG or at least the string itself? |
Here is the text element. <text style="writing-mode: vertical-rl;">(すーっ)</text> |
This character is marked as Transformed typographically, with fallback to Upright in unicode-vo. But we handle only Upright in |
Thank you for pointing this out. I am wondering some characters like the following are rotated correctly:
|
I saw your unicode-vo code. What is the difference between |
I have absolutely no idea... |
I understood the way the current code does it. It just rotates upright characters 90 degrees. That's why the parenthesis and prolonged sound mark are positioned slightly offset. But we should change the vertical glyph for these characters. The Japanese fonts have the vertical glyphs, but I don't know how to extract them. |
Are you sure? Fonts can have vertical layout specific metrics, but not separate glyphs. |
Yes, I'm sure. Especially in Japanese and Chinese text, when characters like U+2329 (〈) use different glyphs for horizontal and vertical writing, the substitution is specified in the font's GSUB (Glyph Substitution) table, and the placement information for the substituted glyph is obtained from the vmtx table. |
GSUB and vmtx are already handled for us by |
Thank you. I hope someone would handle if orientation == Orientation::TransformedOrUpright. |
I appreciate that resvg supports vertical writing-mode. When testing with Japanese vertical text, I noticed some characters are rotated incorrectly.
The issue appears to affect specific characters like 'yoon', 'sokuon' in vertical writing mode.
https://en.wikipedia.org/wiki/Y%C5%8Don
https://en.wikipedia.org/wiki/Sokuon
As shown in the attached image:
The text was updated successfully, but these errors were encountered: