【发布时间】:2014-05-02 22:09:30
【问题描述】:
我在我的 NSMenuItem 中使用 NSAttributed NSString,但它的字体与默认字体相比发生了变化,我想为 Attributed 字符串使用默认字体。
谁能解释一下,如何找到或获取 NSMenuItems 的默认字体。
现在我正在使用这个:
NSDictionary *attributes = @{
NSFontAttributeName: [NSFont fontWithName:@"Helvetica" size:14],
NSForegroundColorAttributeName: [NSColor blackColor],
NSParagraphStyleAttributeName:paragraphStyle
};
谢谢
【问题讨论】:
-
NSFont 提供 systemFont - 你试过吗?
标签: objective-c cocoa nsmenu nsmenuitem