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 #include "SkAdvancedTypefaceMetrics.h" | 9 #include "SkAdvancedTypefaceMetrics.h" |
10 #include "SkBase64.h" | 10 #include "SkBase64.h" |
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 return SkNEW_ARGS(SkFontStyleSetGDI, (lf.lfFaceName)); | 2487 return SkNEW_ARGS(SkFontStyleSetGDI, (lf.lfFaceName)); |
2488 } | 2488 } |
2489 | 2489 |
2490 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], | 2490 virtual SkTypeface* onMatchFamilyStyle(const char familyName[], |
2491 const SkFontStyle& fontstyle) const S
K_OVERRIDE { | 2491 const SkFontStyle& fontstyle) const S
K_OVERRIDE { |
2492 // could be in base impl | 2492 // could be in base impl |
2493 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); | 2493 SkAutoTUnref<SkFontStyleSet> sset(this->matchFamily(familyName)); |
2494 return sset->matchStyle(fontstyle); | 2494 return sset->matchStyle(fontstyle); |
2495 } | 2495 } |
2496 | 2496 |
| 2497 virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], con
st SkFontStyle&, |
| 2498 const char* bcp47[], int bcp
47Count, |
| 2499 SkUnichar character) const S
K_OVERRIDE { |
| 2500 return NULL; |
| 2501 } |
| 2502 |
2497 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, | 2503 virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, |
2498 const SkFontStyle& fontstyle) const SK_
OVERRIDE { | 2504 const SkFontStyle& fontstyle) const SK_
OVERRIDE { |
2499 // could be in base impl | 2505 // could be in base impl |
2500 SkString familyName; | 2506 SkString familyName; |
2501 ((LogFontTypeface*)familyMember)->getFamilyName(&familyName); | 2507 ((LogFontTypeface*)familyMember)->getFamilyName(&familyName); |
2502 return this->matchFamilyStyle(familyName.c_str(), fontstyle); | 2508 return this->matchFamilyStyle(familyName.c_str(), fontstyle); |
2503 } | 2509 } |
2504 | 2510 |
2505 virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const
SK_OVERRIDE { | 2511 virtual SkTypeface* onCreateFromStream(SkStream* stream, int ttcIndex) const
SK_OVERRIDE { |
2506 return create_from_stream(stream); | 2512 return create_from_stream(stream); |
(...skipping 28 matching lines...) Expand all Loading... |
2535 | 2541 |
2536 private: | 2542 private: |
2537 SkTDArray<ENUMLOGFONTEX> fLogFontArray; | 2543 SkTDArray<ENUMLOGFONTEX> fLogFontArray; |
2538 }; | 2544 }; |
2539 | 2545 |
2540 /////////////////////////////////////////////////////////////////////////////// | 2546 /////////////////////////////////////////////////////////////////////////////// |
2541 | 2547 |
2542 SkFontMgr* SkFontMgr_New_GDI() { | 2548 SkFontMgr* SkFontMgr_New_GDI() { |
2543 return SkNEW(SkFontMgrGDI); | 2549 return SkNEW(SkFontMgrGDI); |
2544 } | 2550 } |
OLD | NEW |