Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: src/ports/SkFontHost_FreeType_common.h

Issue 101423004: refactor emboldenGlyph (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase to master Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_FreeType_common.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_FreeType_common.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698