diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 94af9ec285..a2a139c439 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -1403,6 +1403,19 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* metrics metrics->fUnderlinePosition = underlinePosition * scale; } +/////////////////////////////////////////////////////////////////////////////// + +// hand-tuned value to reduce outline embolden strength +#ifndef SK_OUTLINE_EMBOLDEN_DIVISOR + #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + #define SK_OUTLINE_EMBOLDEN_DIVISOR 34 + #else + #define SK_OUTLINE_EMBOLDEN_DIVISOR 24 + #endif +#endif + +/////////////////////////////////////////////////////////////////////////////// + void SkScalerContext_FreeType::emboldenIfNeeded(FT_Face face, FT_GlyphSlot glyph) { // check to see if the embolden bit is set @@ -1413,7 +1426,8 @@ void SkScalerContext_FreeType::emboldenIfNeeded(FT_Face face, FT_GlyphSlot glyph switch (glyph->format) { case FT_GLYPH_FORMAT_OUTLINE: FT_Pos strength; - strength = FT_MulFix(face->units_per_EM, face->size->metrics.y_scale) / 24; + strength = FT_MulFix(face->units_per_EM, face->size->metrics.y_scale) + / SK_OUTLINE_EMBOLDEN_DIVISOR; FT_Outline_Embolden(&glyph->outline, strength); break; case FT_GLYPH_FORMAT_BITMAP: |