NSStatusItem中的模糊文本

Pau*_*aul 5 cocoa nsstatusitem

我在启动时显示statusItem,如下所示:

theItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];

 NSString *theString = [textField stringValue];
 (textField.stringValue = theString);

    [theItem setTitle:theString];
    [theItem setHighlightMode:YES];
Run Code Online (Sandbox Code Playgroud)

文字看起来很模糊.如何清理文本的外观?

谢谢.

保罗

这是一个屏幕截图,顶部是数字菜单栏时钟,底部是NSStatusItem标题:

数字时钟在顶部,NSStatusItem标题在底部

小智 0

对我来说看起来相当不错。

\n\n

测试状态栏,文本中包含“testing.\xe2\x80\xa6”

\n\n

好吧,不是“完美”,但更多的是不均匀的缩放而不是“模糊”。这也是你所看到的吗?

\n

  • NSStatusItem 的标题使用子像素抗锯齿。因此,字形的边缘似乎包含红色和蓝色的阴影。例如,数字菜单栏时钟中的字形边缘似乎仅包含灰色阴影。相比之下,这使得 NSStatusItem 标题显得“模糊”。 (4认同)