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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 static FontConfigTypeface* Create(const SkFontStyle& style, bool fixedWidth, | 27 static FontConfigTypeface* Create(const SkFontStyle& style, bool fixedWidth, |
28 SkStreamAsset* localStream) { | 28 SkStreamAsset* localStream) { |
29 return SkNEW_ARGS(FontConfigTypeface, (style, fixedWidth, localStream)); | 29 return SkNEW_ARGS(FontConfigTypeface, (style, fixedWidth, localStream)); |
30 } | 30 } |
31 | 31 |
32 const SkFontConfigInterface::FontIdentity& getIdentity() const { | 32 const SkFontConfigInterface::FontIdentity& getIdentity() const { |
33 return fIdentity; | 33 return fIdentity; |
34 } | 34 } |
35 | 35 |
36 const char* getFamilyName() const { return fFamilyName.c_str(); } | |
37 SkStreamAsset* getLocalStream() const { return fLocalStream.get(); } | 36 SkStreamAsset* getLocalStream() const { return fLocalStream.get(); } |
38 | 37 |
39 bool isFamilyName(const char* name) const { | 38 bool isFamilyName(const char* name) const { |
40 return fFamilyName.equals(name); | 39 return fFamilyName.equals(name); |
41 } | 40 } |
42 | 41 |
43 static SkTypeface* LegacyCreateTypeface(const SkTypeface* family, | 42 static SkTypeface* LegacyCreateTypeface(const SkTypeface* family, |
44 const char familyName[], | 43 const char familyName[], |
45 SkTypeface::Style); | 44 SkTypeface::Style); |
46 | 45 |
(...skipping 14 matching lines...) Expand all Loading... |
61 // we default to empty fFamilyName and fIdentity | 60 // we default to empty fFamilyName and fIdentity |
62 } | 61 } |
63 | 62 |
64 void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; | 63 void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; |
65 void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; | 64 void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; |
66 SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; | 65 SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; |
67 | 66 |
68 private: | 67 private: |
69 typedef SkTypeface_FreeType INHERITED; | 68 typedef SkTypeface_FreeType INHERITED; |
70 }; | 69 }; |
OLD | NEW |