nib2cib now takes care of bold and italic

This allows to set bold and italic in IB even if the size of the font is the default one
This commit is contained in:
Antoine Mercadal authored and Alexander Ljungberg committed 2011-05-17 00:45:28 -04:00
1 parent 8bdb0f6215
commit e77c706c38
1 file changed
+4 -2
+4 -2
View File
@@ -63,9 +63,11 @@ var IBDefaultFontFace = @"Lucida Grande",
if (name === IBDefaultFontFace)
{
var size = [aFont size];
var size = [aFont size],
bold = [aFont isBold],
italic = [aFont isItalic];
if (size === IBDefaultFontSize)
if (size === IBDefaultFontSize && !bold && !italic)
return nil;
else
return [[CPFont alloc] _initWithName:[CPFont systemFontFace] size:size bold:[aFont isBold] italic:[aFont isItalic]];