Font in TextFieldCell in Matrix
Font in TextFieldCell in Matrix
- Subject: Font in TextFieldCell in Matrix
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 10 Aug 2011 11:21:17 +0200
NSTextField does NOT accept my font.
NSTextFieldCell *cell = [ matrix selectedCell ];
NSLog(@"%s cell %@",__FUNCTION__, cell);
----> cell <NSTextFieldCell: 0x10017cc60>
NSFont *font = [ NSFont fontWithName: @"Osaka-Mono" size: 14 ];
NSLog(@"%s font %@",__FUNCTION__, font);
----> font "Osaka-Mono 14.00 pt. P [] (0x10052a370) fobj=0x1001afed0, spc=7.00"
NSMutableAttributedString *attribStr = [ [ NSMutableAttributedString alloc ] initWithString: @"abc" ];
NSUInteger length = [ attribStr length ];
[ attribStr addAttribute: NSFontAttributeName value: font range: NSMakeRange(0,length) ];
NSLog(@"%s attribStr %@",__FUNCTION__, attribStr);
----> attribStr abc{
NSFont = "\"Osaka-Mono 14.00 pt. P [] (0x1001b0580) fobj=0x1001775a0, spc=7.00\"";
So far everything ok. But now I use attribStr for my cell:
[ cell setAttributedStringValue: attribStr ];
NSLog(@"%s attributedStringValue %@",__FUNCTION__, [cell attributedStringValue]);
----> attributedStringValue abc{
NSColor = "NSNamedColorSpace System textColor";
NSFont = "\"LucidaGrande 9.00 pt. P [] (0x100543dc0) fobj=0x100178770, spc=2.85\"";
NSOriginalFont = "\"LucidaGrande 9.00 pt. P [] (0x100543dc0) fobj=0x100178770, spc=2.85\"";
NSParagraphStyle = "Alignment 4, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n 28L,\n 56L,\n 84L,\n 112L,\n 140L,\n 168L,\n 196L,\n 224L,\n 252L,\n 280L,\n 308L,\n 336L\n), DefaultTabInterval 0, Blocks (null), Lists (null), BaseWritingDirection -1, HyphenationFactor 0, TighteningFactor 0.05, HeaderLevel 0";
}
Where is my Osaka font gone?
What am I doing wrong?
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden