userFontOfSize:
文書と他のテキストのデフォルトフォントを返します
+(NSFont *)userFontOfSize:(float)fontSize:
解説
文書と他のテキストのデフォルトフォントを返します。
英語環境ではHelvetica
返り値
( NSFont * )
フォント
引数
( float )fontSize
フォントサイズ
フレームワーク
ApplicationKit
クラス
NSFont
Class Methods
使用可能
10.0
参照
+ userFontOfSize:
+ fontWithName:size:
+ setUserFixedPitchFont:
例文
#import "MyView.h" //MyViewはNSViewのサブクラス @implementation MyView -(void)drawRect:(NSRect)rect { NSFont *font =[NSFont userFontOfSize:50.0]; NSLog([font fontName]); NSBezierPath *thePath = [NSBezierPath bezierPath]; NSGlyph glyphID[11]={43,72,79,79,82,04,58,82,85,79,71}; [thePath moveToPoint:NSMakePoint(10,10)]; [thePath appendBezierPathWithGlyphs:&glyphID[0] count:11 inFont:font ]; [[NSColor blueColor] set]; [thePath fill]; } @end