From e4c708efdec457c39c0c8824095195953db6d531 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Tue, 17 May 2011 00:28:33 +0200 Subject: [PATCH] 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 --- Tools/nib2cib/NSFont.j | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tools/nib2cib/NSFont.j b/Tools/nib2cib/NSFont.j index cb26ca353..87f7a5367 100644 --- a/Tools/nib2cib/NSFont.j +++ b/Tools/nib2cib/NSFont.j @@ -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]];