| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 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 "SkFontMgr.h" | 8 #include "SkFontMgr.h" |
| 9 #include "SkFontStyle.h" | 9 #include "SkFontStyle.h" |
| 10 #include "SkFontConfigInterface.h" | 10 #include "SkFontConfigInterface.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 } | 278 } |
| 279 | 279 |
| 280 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, | 280 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, |
| 281 (trimmedMatches.begin(), | 281 (trimmedMatches.begin(), |
| 282 trimmedMatches.count())); | 282 trimmedMatches.count())); |
| 283 return sset; | 283 return sset; |
| 284 } | 284 } |
| 285 | 285 |
| 286 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], | 286 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], |
| 287 const SkFontStyle&) const SK_OVERRIDE
{ return NULL; } | 287 const SkFontStyle&) const SK_OVERRIDE
{ return NULL; } |
| 288 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con
st SkFontStyle&, |
| 289 const char* bcp47[], int bcp
47Count, |
| 290 SkUnichar character) const S
K_OVERRIDE { |
| 291 return NULL; |
| 292 } |
| 288 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, | 293 virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, |
| 289 const SkFontStyle&) const SK_OVERRIDE {
return NULL; } | 294 const SkFontStyle&) const SK_OVERRIDE {
return NULL; } |
| 290 | 295 |
| 291 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const SK_OVERRID
E { return NULL; } | 296 virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const SK_OVERRID
E { return NULL; } |
| 292 | 297 |
| 293 virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const
SK_OVERRIDE { | 298 virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const
SK_OVERRIDE { |
| 294 const size_t length = stream->getLength(); | 299 const size_t length = stream->getLength(); |
| 295 if (!length) { | 300 if (!length) { |
| 296 return NULL; | 301 return NULL; |
| 297 } | 302 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 320 FCLocker lock; | 325 FCLocker lock; |
| 321 return FontConfigTypeface::LegacyCreateTypeface(NULL, familyName, | 326 return FontConfigTypeface::LegacyCreateTypeface(NULL, familyName, |
| 322 (SkTypeface::Style)styleBits); | 327 (SkTypeface::Style)styleBits); |
| 323 } | 328 } |
| 324 }; | 329 }; |
| 325 | 330 |
| 326 SkFontMgr* SkFontMgr::Factory() { | 331 SkFontMgr* SkFontMgr::Factory() { |
| 327 SkFontConfigInterface* fci = RefFCI(); | 332 SkFontConfigInterface* fci = RefFCI(); |
| 328 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL; | 333 return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL; |
| 329 } | 334 } |
| OLD | NEW |