Cocoa NSUnderlineStyleSingle是两个像素

Cocoa NSUnderlineStyleSingle是两个像素,cocoa,nsview,nsattributedstring,nsmutableattributedstring,Cocoa,Nsview,Nsattributedstring,Nsmutableattributedstring,我试图在自定义NSView(NSButton attributedString)上的属性字符串下面获得一行,并且我正在使用NSUnderlineStyleAttributeName [self addAttribute:NSUnderlineStyleAttributeName value:@(NSUnderlineStyleSingle) range:range]; 在非视网膜屏幕上的结果如下: 这条线很粗(2个像素),我尝试了NSUnderlineStyleAttributeNa

我试图在自定义NSView(NSButton attributedString)上的属性字符串下面获得一行,并且我正在使用NSUnderlineStyleAttributeName

    [self addAttribute:NSUnderlineStyleAttributeName value:@(NSUnderlineStyleSingle) range:range];
在非视网膜屏幕上的结果如下:

这条线很粗(2个像素),我尝试了NSUnderlineStyleAttributeName的各种组合,并尝试将Y轴偏移0.25f或0.50f,但这并不能解决问题,它使它像“预期”一样模糊


有什么想法吗?我不想在代码中划清界限,我正在寻找一种具有属性字符串的解决方案。

这似乎是所使用字体的问题,因为其他具有NSUnderlineStyleSingle属性的字体不会表现出相同的行为

例: