screenFontWithRenderingMode:
指定したレンダリングモードのスクリーンフォントを返します
-(NSFont *)screenFontWithRenderingMode:(NSFontRenderingMode)renderingMode:
解説
指定したレンダリングモードのスクリーンフォントを返します。
返り値
( NSFont * )
なし
引数
( NSFontRenderingMode )renderingMode
レンダリングモード
NSFontDefaultRenderingMode
NSFontAntialiasedRenderingMode
NSFontIntegerAdvancementsRenderingMode
NSFontAntialiasedIntegerAdvancementsRenderingMode
フレームワーク
ApplicationKit
クラス
NSFont
Instance Methods
使用可能
10.4
参照
-printerFont
-screenFont
例文
#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 screenFontWithRenderingMode:NSFontAntialiasedRenderingMode] displayName]); } @end