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

Unified Diff: src/ports/SkFontHost_FreeType_common.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontHost_FreeType_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType_common.cpp
diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp
index 065a83a41c2d4c3546363d311ec501cdb57b40ab..e4323d81a1c8c8a5ba73950a361428d6ffa3b187 100644
--- a/src/ports/SkFontHost_FreeType_common.cpp
+++ b/src/ports/SkFontHost_FreeType_common.cpp
@@ -344,11 +344,6 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, const SkGly
FT_BBox bbox;
FT_Bitmap target;
- if (fRec.fFlags & SkScalerContext::kEmbolden_Flag &&
- !(face->style_flags & FT_STYLE_FLAG_BOLD)) {
- emboldenOutline(face, outline);
- }
-
int dx = 0, dy = 0;
if (fRec.fFlags & SkScalerContext::kSubpixelPositioning_Flag) {
dx = SkFixedToFDot6(glyph.getSubXFixed());
@@ -547,10 +542,6 @@ static int cubic_proc(const FT_Vector* pt0, const FT_Vector* pt1,
void SkScalerContext_FreeType_Base::generateGlyphPath(FT_Face face,
SkPath* path)
{
- if (fRec.fFlags & SkScalerContext::kEmbolden_Flag) {
- emboldenOutline(face, &face->glyph->outline);
- }
-
FT_Outline_Funcs funcs;
funcs.move_to = move_proc;
@@ -569,11 +560,3 @@ void SkScalerContext_FreeType_Base::generateGlyphPath(FT_Face face,
path->close();
}
-
-void SkScalerContext_FreeType_Base::emboldenOutline(FT_Face face, FT_Outline* outline)
-{
- FT_Pos strength;
- strength = FT_MulFix(face->units_per_EM, face->size->metrics.y_scale)
- / 24;
- FT_Outline_Embolden(outline, strength);
-}
« no previous file with comments | « src/ports/SkFontHost_FreeType_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698