| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 The Android Open Source Project | 3 * Copyright 2013 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 #include "SkFontConfigInterface.h" | 9 #include "SkFontConfigInterface.h" |
| 10 #include "SkTypeface_android.h" | 10 #include "SkTypeface_android.h" |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 const SkTypeface* origTypeface = SkTypefaceCache::FindByID(origFontID); | 626 const SkTypeface* origTypeface = SkTypefaceCache::FindByID(origFontID); |
| 627 if (NULL != origTypeface) { | 627 if (NULL != origTypeface) { |
| 628 origStyle = origTypeface->style(); | 628 origStyle = origTypeface->style(); |
| 629 } | 629 } |
| 630 | 630 |
| 631 // we must convert currTypeface into a FontRecID | 631 // we must convert currTypeface into a FontRecID |
| 632 FontRecID currFontRecID = INVALID_FONT_REC_ID; | 632 FontRecID currFontRecID = INVALID_FONT_REC_ID; |
| 633 const SkTypeface* currTypeface = SkTypefaceCache::FindByID(currFontID); | 633 const SkTypeface* currTypeface = SkTypefaceCache::FindByID(currFontID); |
| 634 // non-system fonts are not in the font cache so if we are asked to fallback | 634 // non-system fonts are not in the font cache so if we are asked to fallback |
| 635 // for a non-system font we will start at the front of the chain. | 635 // for a non-system font we will start at the front of the chain. |
| 636 if (NULL != currTypeface && currFontID != origFontID) { | 636 if (NULL != currTypeface) { |
| 637 currFontRecID = ((FontConfigTypeface*)currTypeface)->getIdentity().fID; | 637 currFontRecID = ((FontConfigTypeface*)currTypeface)->getIdentity().fID; |
| 638 SkASSERT(INVALID_FONT_REC_ID != currFontRecID); | 638 SkASSERT(INVALID_FONT_REC_ID != currFontRecID); |
| 639 } | 639 } |
| 640 | 640 |
| 641 FamilyRecID currFamilyRecID = INVALID_FAMILY_REC_ID; | 641 FamilyRecID currFamilyRecID = INVALID_FAMILY_REC_ID; |
| 642 if (INVALID_FONT_REC_ID != currFontRecID) { | 642 if (INVALID_FONT_REC_ID != currFontRecID) { |
| 643 currFamilyRecID = fFonts[currFontRecID].fFamilyRecID; | 643 currFamilyRecID = fFonts[currFontRecID].fFamilyRecID; |
| 644 } | 644 } |
| 645 | 645 |
| 646 // lookup the index next font in the chain | 646 // lookup the index next font in the chain |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 return SkSafeRef(retTypeface); | 906 return SkSafeRef(retTypeface); |
| 907 } | 907 } |
| 908 | 908 |
| 909 #endif | 909 #endif |
| 910 | 910 |
| 911 /////////////////////////////////////////////////////////////////////////////// | 911 /////////////////////////////////////////////////////////////////////////////// |
| 912 | 912 |
| 913 SkFontMgr* SkFontMgr::Factory() { | 913 SkFontMgr* SkFontMgr::Factory() { |
| 914 return NULL; | 914 return NULL; |
| 915 } | 915 } |
| OLD | NEW |