fontstash icon indicating copy to clipboard operation
fontstash copied to clipboard

some glyphs display wrong

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

I use fontstash to draw a str = @"i:ə:ɔ:u:ɑ:i:ɜ:ɔ:u:ɑ:iɜɔuɑ", the glyph of "ɜ" display wrong. use "PingFangSC-Regular" image use "SFUIText-Light" image use "HelveticaNeue" image

addtional, I suggest updating stb_trunetype to the latest version in order to support OpenType format, which internal use of the CCF table.

tailangjun avatar Jul 26 '17 03:07 tailangjun

I just merged #31 which updated stb_truetype. Can you try the latest first?

memononen avatar Jul 26 '17 05:07 memononen

I just updated to the latest version, the effect is the same.

tailangjun avatar Jul 26 '17 06:07 tailangjun

Do you know a way to get access to those fonts? Looks like they are iOS fonts, but I'm unable to locate download for them.

memononen avatar Jul 26 '17 18:07 memononen

iOS sandbox prevents access to system's ttf. so I use a memFont, which parsing from CGFont. You can try this ttf file, the effect is the same. PingFang-Regular.ttf.zip

tailangjun avatar Jul 27 '17 07:07 tailangjun

adtional, freetype2 and stb_truetype has the same effect.

tailangjun avatar Jul 27 '17 09:07 tailangjun

Thanks for the font, I'll take a look. Since HelvetivaNeue is working ok, you are probably using UTF-8 for the string correctly.

memononen avatar Jul 27 '17 18:07 memononen

I don't think the PingFang font has that glyph.

You can use for example this tool to check which glyphs are in the font: http://bluejamesbond.github.io/CharacterMap/

memononen avatar Jul 27 '17 19:07 memononen