| Home 目次>ApplicationKit>NSFont | |
printerFont
プリンタフォントを返します
-(NSFont *) printerFont
【返り値】 | |
| NSFont * | プリンタフォント |
【解説】
プリンタフォントを返します。
【例文】
#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 printerFont] displayName]);
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSFont | 修正日2007.4.10 |