| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifdef SK_BUILD_FOR_MAC | 9 #ifdef SK_BUILD_FOR_MAC |
| 10 #import <ApplicationServices/ApplicationServices.h> | 10 #import <ApplicationServices/ApplicationServices.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #ifdef SK_BUILD_FOR_IOS | 13 #ifdef SK_BUILD_FOR_IOS |
| 14 #include <CoreText/CoreText.h> | 14 #include <CoreText/CoreText.h> |
| 15 #include <CoreText/CTFontManager.h> | 15 #include <CoreText/CTFontManager.h> |
| 16 #include <CoreGraphics/CoreGraphics.h> | 16 #include <CoreGraphics/CoreGraphics.h> |
| 17 #include <CoreFoundation/CoreFoundation.h> | 17 #include <CoreFoundation/CoreFoundation.h> |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 #include "SkFontHost.h" | |
| 21 #include "SkCGUtils.h" | 20 #include "SkCGUtils.h" |
| 22 #include "SkColorPriv.h" | 21 #include "SkColorPriv.h" |
| 23 #include "SkDescriptor.h" | 22 #include "SkDescriptor.h" |
| 24 #include "SkEndian.h" | 23 #include "SkEndian.h" |
| 25 #include "SkFontDescriptor.h" | 24 #include "SkFontDescriptor.h" |
| 26 #include "SkFloatingPoint.h" | 25 #include "SkFloatingPoint.h" |
| 27 #include "SkGlyph.h" | 26 #include "SkGlyph.h" |
| 28 #include "SkLazyFnPtr.h" | 27 #include "SkLazyFnPtr.h" |
| 29 #include "SkMaskGamma.h" | 28 #include "SkMaskGamma.h" |
| 30 #include "SkSFNTHeader.h" | 29 #include "SkSFNTHeader.h" |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 break; | 458 break; |
| 460 } | 459 } |
| 461 } | 460 } |
| 462 } | 461 } |
| 463 } | 462 } |
| 464 | 463 |
| 465 SkString fRequestedName; | 464 SkString fRequestedName; |
| 466 AutoCFRelease<CTFontRef> fFontRef; | 465 AutoCFRelease<CTFontRef> fFontRef; |
| 467 | 466 |
| 468 protected: | 467 protected: |
| 469 friend class SkFontHost; // to access our protected members for deprecate
d methods | |
| 470 | |
| 471 int onGetUPEM() const SK_OVERRIDE; | 468 int onGetUPEM() const SK_OVERRIDE; |
| 472 SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; | 469 SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; |
| 473 void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; | 470 void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; |
| 474 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE
; | 471 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE
; |
| 475 int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; | 472 int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; |
| 476 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 473 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
| 477 size_t length, void* data) const SK_OVERRIDE; | 474 size_t length, void* data) const SK_OVERRIDE; |
| 478 SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRID
E; | 475 SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRID
E; |
| 479 void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; | 476 void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; |
| 480 void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; | 477 void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; |
| (...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2287 } | 2284 } |
| 2288 return face; | 2285 return face; |
| 2289 } | 2286 } |
| 2290 }; | 2287 }; |
| 2291 | 2288 |
| 2292 /////////////////////////////////////////////////////////////////////////////// | 2289 /////////////////////////////////////////////////////////////////////////////// |
| 2293 | 2290 |
| 2294 SkFontMgr* SkFontMgr::Factory() { | 2291 SkFontMgr* SkFontMgr::Factory() { |
| 2295 return SkNEW(SkFontMgr_Mac); | 2292 return SkNEW(SkFontMgr_Mac); |
| 2296 } | 2293 } |
| OLD | NEW |