Cocoa API解説(macOS/iOS)

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。

目次

getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:

グリフの情報を得る
-(unsigned int)getGlyphsInRange:(NSRange )glyphsRange:
           glyphs:(NSGlyph *)glyphBuffer:
           characterIndexes:(unsigned *)charIndexBuffer:
           glyphInscriptions:(NSGlyphInscription *)inscribeBuffer:
           elasticBits:(BOOL *)elasticBuffer:

解説

グリフの情報を得る
Mac OS X v10.4以降使用不可です。

返り値

( unsigned int )

整数値

引数

( NSRange  )glyphsRange
( NSGlyph * )glyphBuffer

グリフ

( unsigned * )charIndexBuffer
( NSGlyphInscription * )inscribeBuffer

NSGlyphInscribeBase = 0,
NSGlyphInscribeBelow = 1,
NSGlyphInscribeAbove = 2,
NSGlyphInscribeOverstrike = 3,
NSGlyphInscribeOverBelow = 4

( BOOL * )elasticBuffer

フレームワーク

ApplicationKit

クラス

NSATSTypesetter

Instance Methods

使用可能

10.3

参照

例文

unsigned charIndexBuffer;
NSGlyphInscription inscribeBuffer;
BOOL elasticBuffer;
NSLog(@"%u",
[atsTypesetter getGlyphsInRange:NSMakeRange(0,0)
				glyphs: &gly
				characterIndexes: &charIndexBuffer 
				glyphInscriptions: &inscribeBuffer 
				elasticBits: &elasticBuffer
				]);
	NSLog(@"charIndexBuffer %u",charIndexBuffer);
	switch (inscribeBuffer){
			case    NSGlyphInscribeBase:
				NSLog(@"NSGlyphInscribeBase");break;
			case    NSGlyphInscribeBelow:
				NSLog(@"NSGlyphInscribeBase");break;
			case    NSGlyphInscribeAbove:
				NSLog(@"NSGlyphInscribeBase");break;
			case    NSGlyphInscribeOverstrike:
				NSLog(@"NSGlyphInscribeBase");break;
			case    NSGlyphInscribeOverBelow:
				NSLog(@"NSGlyphInscribeBase");break;
			default:
				NSLog(@"default");
			}
	(elasticBuffer) ? NSLog(@"YES") : NSLog(@"NO") ;