Apollo89 · Tag

CUSTOM

관련 글을 최신순으로 정리했습니다.

1 articles
Tech

iPhone에서 Custom font 쓰는 법

iPhone에서 Custom font 쓰는 법 ( test.ttf라는 폰트를 사용할 때 ) 1. 폰트파일을 xcode 프로젝트로 긁어 넣는다. 2. 아래와 같은 방식으로 메모리 로딩 후 사용한다. NSString *fontPath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"ttf"]; CGDataProviderRef fontDataProvider = CGDataProviderCreateWithFilename([fontPath UTF8String]); CGFontRef _cgFont = CGFontCreateWithDataProvider(fontDataProvider); CGDataProviderRelease(fontDataProvider);…

읽어보기 →