开发者

Cocoa Typography: wrong presentation of space unicode characters

开发者 https://www.devze.com 2023-03-04 03:16 出处:网络
It seems that something wrong with typography system in Cocoa. When i try to draw string over the screen with drawInRect (Helvetica):

It seems that something wrong with typography system in Cocoa.

When i try to draw string over the screen with drawInRect (Helvetica):

NSString *tot = [NSString stringWithFormat:@"MMM%CMMM%CMMM MMM", 0x2002, 0x20];

all spaces between letters are the same. But first unicode character is En Space - Width of one en (half of one em).

Same spaces with ot开发者_JAVA技巧her characters, like Four-Per-Em Space Mid Space and so on.


Even tho the glyph you want to draw ('En Space U+2002') is "just a space", it still has to be available in the font you are using.

You will need a much better font than the operating system bundled Helvetica if you want En Space, Four-Per-Em Space, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消