Merge pull request #1266 from primalmotion/cappuccino

---

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:
Alexander Ljungberg committed 2011-05-17 00:11:57 -04:00
commit 0e04f7cae3
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]];