| 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 13 matching lines...) Expand all Loading... |
| 24 protected: | 24 protected: |
| 25 // See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_h
andling.html#FT_Bitmap_Embolden | 25 // See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_h
andling.html#FT_Bitmap_Embolden |
| 26 // This value was chosen by eyeballing the result in Firefox and trying to m
atch it. | 26 // This value was chosen by eyeballing the result in Firefox and trying to m
atch it. |
| 27 static const FT_Pos kBitmapEmboldenStrength = 1 << 6; | 27 static const FT_Pos kBitmapEmboldenStrength = 1 << 6; |
| 28 | 28 |
| 29 SkScalerContext_FreeType_Base(SkTypeface* typeface, const SkScalerContextEff
ects& effects, | 29 SkScalerContext_FreeType_Base(SkTypeface* typeface, const SkScalerContextEff
ects& effects, |
| 30 const SkDescriptor *desc) | 30 const SkDescriptor *desc) |
| 31 : INHERITED(typeface, effects, desc) | 31 : INHERITED(typeface, effects, desc) |
| 32 {} | 32 {} |
| 33 | 33 |
| 34 void generateGlyphImage(FT_Face face, const SkGlyph& glyph); | 34 void generateGlyphImage(FT_Face face, const SkGlyph& glyph, const SkMatrix&
bitmapTransform); |
| 35 void generateGlyphPath(FT_Face face, SkPath* path); | 35 void generateGlyphPath(FT_Face face, SkPath* path); |
| 36 | |
| 37 private: | 36 private: |
| 38 typedef SkScalerContext INHERITED; | 37 typedef SkScalerContext INHERITED; |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 class SkTypeface_FreeType : public SkTypeface { | 40 class SkTypeface_FreeType : public SkTypeface { |
| 42 public: | 41 public: |
| 43 /** For SkFontMgrs to make use of our ability to extract | 42 /** For SkFontMgrs to make use of our ability to extract |
| 44 * name and style from a stream, using FreeType's API. | 43 * name and style from a stream, using FreeType's API. |
| 45 */ | 44 */ |
| 46 class Scanner : ::SkNoncopyable { | 45 class Scanner : ::SkNoncopyable { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 90 |
| 92 int onGetTableTags(SkFontTableTag tags[]) const override; | 91 int onGetTableTags(SkFontTableTag tags[]) const override; |
| 93 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 92 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
| 94 size_t length, void* data) const override; | 93 size_t length, void* data) const override; |
| 95 | 94 |
| 96 private: | 95 private: |
| 97 typedef SkTypeface INHERITED; | 96 typedef SkTypeface INHERITED; |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 #endif // SKFONTHOST_FREETYPE_COMMON_H_ | 99 #endif // SKFONTHOST_FREETYPE_COMMON_H_ |
| OLD | NEW |