OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 "SkAdvancedTypefaceMetrics.h" | 8 #include "SkAdvancedTypefaceMetrics.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 SkScalerContext_FreeType(SkTypeface*, const SkDescriptor* desc); | 186 SkScalerContext_FreeType(SkTypeface*, const SkDescriptor* desc); |
187 virtual ~SkScalerContext_FreeType(); | 187 virtual ~SkScalerContext_FreeType(); |
188 | 188 |
189 bool success() const { | 189 bool success() const { |
190 return fFaceRec != NULL && | 190 return fFaceRec != NULL && |
191 fFTSize != NULL && | 191 fFTSize != NULL && |
192 fFace != NULL; | 192 fFace != NULL; |
193 } | 193 } |
194 | 194 |
195 protected: | 195 protected: |
196 unsigned generateGlyphCount() SK_OVERRIDE; | 196 unsigned generateGlyphCount() override; |
197 uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; | 197 uint16_t generateCharToGlyph(SkUnichar uni) override; |
198 void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; | 198 void generateAdvance(SkGlyph* glyph) override; |
199 void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; | 199 void generateMetrics(SkGlyph* glyph) override; |
200 void generateImage(const SkGlyph& glyph) SK_OVERRIDE; | 200 void generateImage(const SkGlyph& glyph) override; |
201 void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; | 201 void generatePath(const SkGlyph& glyph, SkPath* path) override; |
202 void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; | 202 void generateFontMetrics(SkPaint::FontMetrics*) override; |
203 SkUnichar generateGlyphToChar(uint16_t glyph) SK_OVERRIDE; | 203 SkUnichar generateGlyphToChar(uint16_t glyph) override; |
204 | 204 |
205 private: | 205 private: |
206 SkFaceRec* fFaceRec; | 206 SkFaceRec* fFaceRec; |
207 FT_Face fFace; // reference to shared face in gFaceRecHead | 207 FT_Face fFace; // reference to shared face in gFaceRecHead |
208 FT_Size fFTSize; // our own copy | 208 FT_Size fFTSize; // our own copy |
209 FT_Int fStrikeIndex; | 209 FT_Int fStrikeIndex; |
210 SkFixed fScaleX, fScaleY; | 210 SkFixed fScaleX, fScaleY; |
211 FT_Matrix fMatrix22; | 211 FT_Matrix fMatrix22; |
212 uint32_t fLoadGlyphFlags; | 212 uint32_t fLoadGlyphFlags; |
213 bool fDoLinearMetrics; | 213 bool fDoLinearMetrics; |
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 if (style) { | 1721 if (style) { |
1722 *style = SkFontStyle(weight, width, slant); | 1722 *style = SkFontStyle(weight, width, slant); |
1723 } | 1723 } |
1724 if (isFixedPitch) { | 1724 if (isFixedPitch) { |
1725 *isFixedPitch = FT_IS_FIXED_WIDTH(face); | 1725 *isFixedPitch = FT_IS_FIXED_WIDTH(face); |
1726 } | 1726 } |
1727 | 1727 |
1728 FT_Done_Face(face); | 1728 FT_Done_Face(face); |
1729 return true; | 1729 return true; |
1730 } | 1730 } |
OLD | NEW |