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

A matter of line width in vertical lines (JP/TC/SC/KR) #34

Closed
AoJPN opened this issue Jul 23, 2015 · 3 comments
Closed

A matter of line width in vertical lines (JP/TC/SC/KR) #34

AoJPN opened this issue Jul 23, 2015 · 3 comments

Comments

@AoJPN
Copy link

AoJPN commented Jul 23, 2015

I have some technical problem with implementing font @noto Sans CJK JP Regular (JP/TC/SC/KR) into our application program.
So I need some help to solve this.

Let me explain about the matter in detail.
It seems that the font oddly makes extremely wide line width when it is displayed in VERTICAL LINES.
Please see the attachment and how it looks.

notosans vertical_writing

This problem has not seen with other font (e.g. MS Gothic shows appropriate line width).
Thus I assume only Noto Sans may have some problem with displaying line width.
So far, I have confirmed the same matter in Microsoft Word (JP), Microsoft Paint (JP) , so is our application program.

The following is what I have tested to resolve it.
-Wrote code with getting the line width by using Draw Text API from Windows GDI.
-As a result, it did not work Ill. In library of FreeType2, ‘max-advance’ which hold the maximum number of line width shows much larger than any other fonts.

After these experiments, I came to the conclusion that the matter is not related to the implementation but Noto Sans font itself.
Based on that, I would be much appreciated to get any solutions.
If there is anything unclear, please ask me.

[My evaluation environment ;
Windows7 Ultimate (x64)
Noto Sans :Version 1.004;PS 1.004; hotconv 1.0.82; makeotf.lib2.5.63406 ]

@kenlunde
Copy link

The problem is that the FontBBox (font bounding box) values are being used for determining line layout, which is a Very Bad Thing™. Some of the glyphs in the font—such as the two- and three-em dashes (U+2E3A and U+2E3B), kana iterator marks (U+3031 and U+3032), and combining jamo—represent the reason why the FontBBox has such values, and that is okay. I suggest that you use other APIs to extract more appropriate values from the fonts, such as those specified in the 'vhea' table.

@AoJPN
Copy link
Author

AoJPN commented Aug 3, 2015

Thank you for your quick response. I am going to try ‘vhea’ table in accordance with your suggestion.
Once again, thanks and I appreciate all your help.

@dougfelt
Copy link
Contributor

Closing this issue. Please reopen this if you were unable to resolve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants