fontstash icon indicating copy to clipboard operation
fontstash copied to clipboard

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

Open tailangjun opened this issue 8 years ago • 4 comments
trafficstars

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 avatar Jun 15 '17 09:06 tailangjun

华文黑体.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.

tailangjun avatar Jun 15 '17 10:06 tailangjun

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.

memononen avatar Jun 15 '17 11:06 memononen

1.use PingFang Regular.ttf usepingfang

2.华文黑体.ttf usehuawen

tailangjun avatar Jun 15 '17 11:06 tailangjun

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

tailangjun avatar Jun 15 '17 12:06 tailangjun