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

Unified Diff: src/ports/SkFontHost_FreeType_common.cpp

Issue 117963003: Revert of Revert of refactor emboldenGlyph (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
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 @@
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 @@
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 @@
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);
-}
« src/ports/SkFontHost_FreeType.cpp ('K') | « src/ports/SkFontHost_FreeType_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698