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 21 matching lines...) Expand all Loading... |
32 // See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_h
andling.html#FT_Bitmap_Embolden | 32 // See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_h
andling.html#FT_Bitmap_Embolden |
33 // This value was chosen by eyeballing the result in Firefox and trying to m
atch it. | 33 // This value was chosen by eyeballing the result in Firefox and trying to m
atch it. |
34 static const FT_Pos kBitmapEmboldenStrength = 1 << 6; | 34 static const FT_Pos kBitmapEmboldenStrength = 1 << 6; |
35 | 35 |
36 SkScalerContext_FreeType_Base(SkTypeface* typeface, const SkDescriptor *desc
) | 36 SkScalerContext_FreeType_Base(SkTypeface* typeface, const SkDescriptor *desc
) |
37 : INHERITED(typeface, desc) | 37 : INHERITED(typeface, desc) |
38 {} | 38 {} |
39 | 39 |
40 void generateGlyphImage(FT_Face face, const SkGlyph& glyph); | 40 void generateGlyphImage(FT_Face face, const SkGlyph& glyph); |
41 void generateGlyphPath(FT_Face face, SkPath* path); | 41 void generateGlyphPath(FT_Face face, SkPath* path); |
| 42 void emboldenOutline(FT_Face face, FT_Outline* outline); |
42 | 43 |
43 private: | 44 private: |
44 typedef SkScalerContext INHERITED; | 45 typedef SkScalerContext INHERITED; |
45 }; | 46 }; |
46 | 47 |
47 class SkTypeface_FreeType : public SkTypeface { | 48 class SkTypeface_FreeType : public SkTypeface { |
48 protected: | 49 protected: |
49 SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch) | 50 SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch) |
50 : INHERITED(style, uniqueID, isFixedPitch) | 51 : INHERITED(style, uniqueID, isFixedPitch) |
51 , fGlyphCount(-1) | 52 , fGlyphCount(-1) |
(...skipping 18 matching lines...) Expand all Loading... |
70 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 71 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
71 size_t length, void* data) const SK_OVERRIDE; | 72 size_t length, void* data) const SK_OVERRIDE; |
72 | 73 |
73 private: | 74 private: |
74 mutable int fGlyphCount; | 75 mutable int fGlyphCount; |
75 | 76 |
76 typedef SkTypeface INHERITED; | 77 typedef SkTypeface INHERITED; |
77 }; | 78 }; |
78 | 79 |
79 #endif // SKFONTHOST_FREETYPE_COMMON_H_ | 80 #endif // SKFONTHOST_FREETYPE_COMMON_H_ |
OLD | NEW |