OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006-2012 The Android Open Source Project | 2 * Copyright 2006-2012 The Android Open Source Project |
3 * Copyright 2012 Mozilla Foundation | 3 * Copyright 2012 Mozilla Foundation |
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 #ifndef SKFONTHOST_FREETYPE_COMMON_H_ | 9 #ifndef SKFONTHOST_FREETYPE_COMMON_H_ |
10 #define SKFONTHOST_FREETYPE_COMMON_H_ | 10 #define SKFONTHOST_FREETYPE_COMMON_H_ |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 SkFixed* axisValues, | 64 SkFixed* axisValues, |
65 const SkString& name); | 65 const SkString& name); |
66 | 66 |
67 private: | 67 private: |
68 FT_Face openFace(SkStream* stream, int ttcIndex, FT_Stream ftStream) con
st; | 68 FT_Face openFace(SkStream* stream, int ttcIndex, FT_Stream ftStream) con
st; |
69 FT_Library fLibrary; | 69 FT_Library fLibrary; |
70 mutable SkMutex fLibraryMutex; | 70 mutable SkMutex fLibraryMutex; |
71 }; | 71 }; |
72 | 72 |
73 protected: | 73 protected: |
74 SkTypeface_FreeType(const SkFontStyle& style, SkFontID uniqueID, bool isFixe
dPitch) | 74 SkTypeface_FreeType(const SkFontStyle& style, bool isFixedPitch) |
75 : INHERITED(style, uniqueID, isFixedPitch) | 75 : INHERITED(style, isFixedPitch) |
76 {} | 76 {} |
77 | 77 |
78 virtual SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&
, | 78 virtual SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&
, |
79 const SkDescriptor*) const ov
erride; | 79 const SkDescriptor*) const ov
erride; |
80 void onFilterRec(SkScalerContextRec*) const override; | 80 void onFilterRec(SkScalerContextRec*) const override; |
81 SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( | 81 SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( |
82 PerGlyphInfo, const uint32_t*, uint32_t) const override; | 82 PerGlyphInfo, const uint32_t*, uint32_t) const override; |
83 int onGetUPEM() const override; | 83 int onGetUPEM() const override; |
84 virtual bool onGetKerningPairAdjustments(const uint16_t glyphs[], int count, | 84 virtual bool onGetKerningPairAdjustments(const uint16_t glyphs[], int count, |
85 int32_t adjustments[]) const override; | 85 int32_t adjustments[]) const override; |
86 virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], | 86 virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], |
87 int glyphCount) const override; | 87 int glyphCount) const override; |
88 int onCountGlyphs() const override; | 88 int onCountGlyphs() const override; |
89 | 89 |
90 LocalizedStrings* onCreateFamilyNameIterator() const override; | 90 LocalizedStrings* onCreateFamilyNameIterator() const override; |
91 | 91 |
92 int onGetTableTags(SkFontTableTag tags[]) const override; | 92 int onGetTableTags(SkFontTableTag tags[]) const override; |
93 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 93 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
94 size_t length, void* data) const override; | 94 size_t length, void* data) const override; |
95 | 95 |
96 private: | 96 private: |
97 typedef SkTypeface INHERITED; | 97 typedef SkTypeface INHERITED; |
98 }; | 98 }; |
99 | 99 |
100 #endif // SKFONTHOST_FREETYPE_COMMON_H_ | 100 #endif // SKFONTHOST_FREETYPE_COMMON_H_ |
OLD | NEW |