Lines Matching defs:fontRef
371 static SkFontID CTFontRef_to_SkFontID(CTFontRef fontRef) {
376 ATSFontRef ats = CTFontGetPlatformFont(fontRef, NULL);
385 AutoCFRelease<CGFontRef> cgFont(CTFontCopyGraphicsFont(fontRef, NULL));
393 id = (SkFontID) (uintptr_t) fontRef;
425 CTFontRef fontRef, const char name[], bool isLocalStream)
428 , fFontRef(fontRef) // caller has already called CFRetain for us
432 SkASSERT(fontRef);
436 CTFontRef fontRef, const char name[], bool isLocalStream)
439 , fFontRef(fontRef) // caller has already called CFRetain for us
443 SkASSERT(fontRef);
476 static SkTypeface* NewFromFontRef(CTFontRef fontRef, const char name[], bool isLocalStream) {
477 SkASSERT(fontRef);
479 SkTypeface::Style style = computeStyleBits(fontRef, &isFixedPitch);
480 SkFontID fontID = CTFontRef_to_SkFontID(fontRef);
482 return new SkTypeface_Mac(style, fontID, isFixedPitch, fontRef, name, isLocalStream);
554 SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef fontRef) {
555 SkFontID fontID = CTFontRef_to_SkFontID(fontRef);
560 face = NewFromFontRef(fontRef, NULL, false);
565 CFRetain(fontRef);