| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The Android Open Source Project | 2 * Copyright 2009 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkFontLCDConfig.h" | 8 #include "SkFontLCDConfig.h" |
| 9 #include "SkLazyPtr.h" | 9 #include "SkLazyPtr.h" |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 virtual SkFontStyleSet* onMatchFamily(const char[]) const SK_OVERRIDE { | 105 virtual SkFontStyleSet* onMatchFamily(const char[]) const SK_OVERRIDE { |
| 106 return SkFontStyleSet::CreateEmpty(); | 106 return SkFontStyleSet::CreateEmpty(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 virtual SkTypeface* onMatchFamilyStyle(const char[], | 109 virtual SkTypeface* onMatchFamilyStyle(const char[], |
| 110 const SkFontStyle&) const SK_OVERRIDE
{ | 110 const SkFontStyle&) const SK_OVERRIDE
{ |
| 111 return NULL; | 111 return NULL; |
| 112 } | 112 } |
| 113 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], | 113 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], |
| 114 const SkFontStyle& style, | 114 const SkFontStyle& style, |
| 115 const char bpc47[], | 115 const char* bcp47[], |
| 116 uint32_t character) const SK
_OVERRIDE { | 116 int bcpLength, |
| 117 SkUnichar character) const S
K_OVERRIDE { |
| 117 return NULL; | 118 return NULL; |
| 118 } | 119 } |
| 119 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, | 120 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, |
| 120 const SkFontStyle&) const SK_OVERRIDE { | 121 const SkFontStyle&) const SK_OVERRIDE { |
| 121 return NULL; | 122 return NULL; |
| 122 } | 123 } |
| 123 virtual SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE { | 124 virtual SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE { |
| 124 return NULL; | 125 return NULL; |
| 125 } | 126 } |
| 126 virtual SkTypeface* onCreateFromStream(SkStream*, int) const SK_OVERRIDE { | 127 virtual SkTypeface* onCreateFromStream(SkStream*, int) const SK_OVERRIDE { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 156 SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const { | 157 SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const { |
| 157 return emptyOnNull(this->onMatchFamily(familyName)); | 158 return emptyOnNull(this->onMatchFamily(familyName)); |
| 158 } | 159 } |
| 159 | 160 |
| 160 SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[], | 161 SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[], |
| 161 const SkFontStyle& fs) const { | 162 const SkFontStyle& fs) const { |
| 162 return this->onMatchFamilyStyle(familyName, fs); | 163 return this->onMatchFamilyStyle(familyName, fs); |
| 163 } | 164 } |
| 164 | 165 |
| 165 SkTypeface* SkFontMgr::matchFamilyStyleCharacter(const char familyName[], const
SkFontStyle& style, | 166 SkTypeface* SkFontMgr::matchFamilyStyleCharacter(const char familyName[], const
SkFontStyle& style, |
| 166 const char bpc47[], uint32_t ch
aracter) const { | 167 const char* bcp47[], int bcpLen
gth, |
| 167 return this->onMatchFamilyStyleCharacter(familyName, style, bpc47, character
); | 168 SkUnichar character) const { |
| 169 return this->onMatchFamilyStyleCharacter(familyName, style, bcp47, bcpLength
, character); |
| 168 } | 170 } |
| 169 | 171 |
| 170 SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face, | 172 SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face, |
| 171 const SkFontStyle& fs) const { | 173 const SkFontStyle& fs) const { |
| 172 return this->onMatchFaceStyle(face, fs); | 174 return this->onMatchFaceStyle(face, fs); |
| 173 } | 175 } |
| 174 | 176 |
| 175 SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const { | 177 SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const { |
| 176 if (NULL == data) { | 178 if (NULL == data) { |
| 177 return NULL; | 179 return NULL; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 202 SkFontMgr* sk_fontmgr_create_default() { | 204 SkFontMgr* sk_fontmgr_create_default() { |
| 203 SkFontMgr* fm = SkFontMgr::Factory(); | 205 SkFontMgr* fm = SkFontMgr::Factory(); |
| 204 return fm ? fm : SkNEW(SkEmptyFontMgr); | 206 return fm ? fm : SkNEW(SkEmptyFontMgr); |
| 205 } | 207 } |
| 206 | 208 |
| 207 SK_DECLARE_STATIC_LAZY_PTR(SkFontMgr, singleton, sk_fontmgr_create_default); | 209 SK_DECLARE_STATIC_LAZY_PTR(SkFontMgr, singleton, sk_fontmgr_create_default); |
| 208 | 210 |
| 209 SkFontMgr* SkFontMgr::RefDefault() { | 211 SkFontMgr* SkFontMgr::RefDefault() { |
| 210 return SkRef(singleton.get()); | 212 return SkRef(singleton.get()); |
| 211 } | 213 } |
| OLD | NEW |