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 "SkFontConfigInterface.h" | 8 #include "SkFontConfigInterface.h" |
9 #include "SkFontHost_FreeType_common.h" | 9 #include "SkFontHost_FreeType_common.h" |
10 #include "SkStream.h" | 10 #include "SkStream.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 bool isFamilyName(const char* name) const { | 44 bool isFamilyName(const char* name) const { |
45 return fFamilyName.equals(name); | 45 return fFamilyName.equals(name); |
46 } | 46 } |
47 | 47 |
48 protected: | 48 protected: |
49 SkTypeface_FCI(SkFontConfigInterface* fci, | 49 SkTypeface_FCI(SkFontConfigInterface* fci, |
50 const SkFontConfigInterface::FontIdentity& fi, | 50 const SkFontConfigInterface::FontIdentity& fi, |
51 const SkString& familyName, | 51 const SkString& familyName, |
52 const SkFontStyle& style) | 52 const SkFontStyle& style) |
53 : INHERITED(style, SkTypefaceCache::NewFontID(), false) | 53 : INHERITED(style, false) |
54 , fFCI(SkRef(fci)) | 54 , fFCI(SkRef(fci)) |
55 , fIdentity(fi) | 55 , fIdentity(fi) |
56 , fFamilyName(familyName) | 56 , fFamilyName(familyName) |
57 , fLocalStream(nullptr) {} | 57 , fLocalStream(nullptr) {} |
58 | 58 |
59 SkTypeface_FCI(const SkFontStyle& style, bool fixedWidth, SkStreamAsset* loc
alStream, int index) | 59 SkTypeface_FCI(const SkFontStyle& style, bool fixedWidth, SkStreamAsset* loc
alStream, int index) |
60 : INHERITED(style, SkTypefaceCache::NewFontID(), fixedWidth) | 60 : INHERITED(style, fixedWidth) |
61 , fLocalStream(localStream) | 61 , fLocalStream(localStream) |
62 { | 62 { |
63 fIdentity.fTTCIndex = index; | 63 fIdentity.fTTCIndex = index; |
64 } | 64 } |
65 | 65 |
66 void onGetFamilyName(SkString* familyName) const override { *familyName = fF
amilyName; } | 66 void onGetFamilyName(SkString* familyName) const override { *familyName = fF
amilyName; } |
67 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; | 67 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; |
68 SkStreamAsset* onOpenStream(int* ttcIndex) const override; | 68 SkStreamAsset* onOpenStream(int* ttcIndex) const override; |
69 | 69 |
70 private: | 70 private: |
71 typedef SkTypeface_FreeType INHERITED; | 71 typedef SkTypeface_FreeType INHERITED; |
72 }; | 72 }; |
OLD | NEW |