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 "SkOnce.h" | 9 #include "SkOnce.h" |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return NULL; | 103 return NULL; |
104 } | 104 } |
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[], |
| 114 const SkFontStyle& style, |
| 115 const char bpc47[], |
| 116 uint32_t character) const SK
_OVERRIDE { |
| 117 return NULL; |
| 118 } |
113 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, | 119 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, |
114 const SkFontStyle&) const SK_OVERRIDE { | 120 const SkFontStyle&) const SK_OVERRIDE { |
115 return NULL; | 121 return NULL; |
116 } | 122 } |
117 virtual SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE { | 123 virtual SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE { |
118 return NULL; | 124 return NULL; |
119 } | 125 } |
120 virtual SkTypeface* onCreateFromStream(SkStream*, int) const SK_OVERRIDE { | 126 virtual SkTypeface* onCreateFromStream(SkStream*, int) const SK_OVERRIDE { |
121 return NULL; | 127 return NULL; |
122 } | 128 } |
(...skipping 26 matching lines...) Expand all Loading... |
149 | 155 |
150 SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const { | 156 SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const { |
151 return emptyOnNull(this->onMatchFamily(familyName)); | 157 return emptyOnNull(this->onMatchFamily(familyName)); |
152 } | 158 } |
153 | 159 |
154 SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[], | 160 SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[], |
155 const SkFontStyle& fs) const { | 161 const SkFontStyle& fs) const { |
156 return this->onMatchFamilyStyle(familyName, fs); | 162 return this->onMatchFamilyStyle(familyName, fs); |
157 } | 163 } |
158 | 164 |
| 165 SkTypeface* SkFontMgr::matchFamilyStyleCharacter(const char familyName[], const
SkFontStyle& style, |
| 166 const char bpc47[], uint32_t ch
aracter) const { |
| 167 return this->onMatchFamilyStyleCharacter(familyName, style, bpc47, character
); |
| 168 } |
| 169 |
159 SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face, | 170 SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face, |
160 const SkFontStyle& fs) const { | 171 const SkFontStyle& fs) const { |
161 return this->onMatchFaceStyle(face, fs); | 172 return this->onMatchFaceStyle(face, fs); |
162 } | 173 } |
163 | 174 |
164 SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const { | 175 SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const { |
165 if (NULL == data) { | 176 if (NULL == data) { |
166 return NULL; | 177 return NULL; |
167 } | 178 } |
168 return this->onCreateFromData(data, ttcIndex); | 179 return this->onCreateFromData(data, ttcIndex); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); | 252 SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); |
242 return fm->createFromFile(path); | 253 return fm->createFromFile(path); |
243 } | 254 } |
244 | 255 |
245 SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) { | 256 SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) { |
246 SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); | 257 SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); |
247 return fm->createFromStream(stream); | 258 return fm->createFromStream(stream); |
248 } | 259 } |
249 | 260 |
250 #endif | 261 #endif |
OLD | NEW |