| 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); | |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 typedef SkScalerContext INHERITED; | 44 typedef SkScalerContext INHERITED; |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 class SkTypeface_FreeType : public SkTypeface { | 47 class SkTypeface_FreeType : public SkTypeface { |
| 49 protected: | 48 protected: |
| 50 SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch) | 49 SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch) |
| 51 : INHERITED(style, uniqueID, isFixedPitch) | 50 : INHERITED(style, uniqueID, isFixedPitch) |
| 52 , fGlyphCount(-1) | 51 , fGlyphCount(-1) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 71 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 70 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
| 72 size_t length, void* data) const SK_OVERRIDE; | 71 size_t length, void* data) const SK_OVERRIDE; |
| 73 | 72 |
| 74 private: | 73 private: |
| 75 mutable int fGlyphCount; | 74 mutable int fGlyphCount; |
| 76 | 75 |
| 77 typedef SkTypeface INHERITED; | 76 typedef SkTypeface INHERITED; |
| 78 }; | 77 }; |
| 79 | 78 |
| 80 #endif // SKFONTHOST_FREETYPE_COMMON_H_ | 79 #endif // SKFONTHOST_FREETYPE_COMMON_H_ |
| OLD | NEW |