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

Set the same size, use different ttf file, the text size of the display difference #29

Open
tailangjun opened this issue Jun 15, 2017 · 4 comments

Comments

@tailangjun
Copy link

tailangjun commented Jun 15, 2017

In order to show Simplified Chinese, I tried several different ttf files. I found that set the same size, use different ttf file, the text size of the display difference. Should we need to read out some parameters from ttf file and set to fontstash?

@tailangjun
Copy link
Author

华文黑体.ttf is bigger than UILabel, use the same fontsize.
诺基亚致美粗黑.ttf is same size with UILabel font size, , use the same fontsize.
PingFang Regular.ttf is smaller than UILabel, use the same fontsize.

@memononen
Copy link
Owner

Can you send a screenshot? Can you see the same difference in a text editor? I'm not sure about chinese characters, but western fonts can have different x-height and k-height. Which makes the fonts look different visually even if the size is the same.

@tailangjun
Copy link
Author

1.use PingFang Regular.ttf
usepingfang

2.华文黑体.ttf
usehuawen

@tailangjun
Copy link
Author

the PingFang Regular.ttf you can achieve use the following link.
https://github.com/ctrngk/backup/blob/master/PingFang%20Regular.ttf

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

2 participants