NSFont:fontName
Home 目次>ApplicationKit>NSFont

fontName

フォント名を返します


-(NSString *) fontName


【返り値】
   NSString *フォント名


【解説】

フォント名を返します。



【例文】


#import "MyView.h"

//MyView NSView のサブクラス
@implementation MyView

-(
void )drawRect:(NSRect)rect
{

NSFont *font =[NSFont fontWithName:
@"KozMinPro-Light" size: 100.0 ]; // グリフ ID のマッピングが Osaka とは違う
//NSFont *font =[NSFont fontWithName:@"HiraMinPro-W3" size:100.0]; // グリフ ID のマッピングが Osaka とは違う

NSBezierPath *thePath = [NSBezierPath bezierPath];
NSGlyph glyphID[
8 ] = { 41 , 70 , 77 , 77 , 80 , 232 , 2632 , 1412 };


[thePath moveToPoint:NSMakePoint(
10 , 10 )];
[thePath appendBezierPathWithGlyphs:&glyphID[
0 ]
count:
8
inFont:font
];


[[NSColor blueColor] set];
[thePath fill];

NSLog([font fontName]);


}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSFont
修正日2007.4.10