Index: src/ports/SkFontHost_FreeType.cpp |
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp |
index 94af9ec28515440fe417426691ec33fc486b6b8f..a2a139c4396dbfa1332284e3e18599f96da08302 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 |
bungeman-skia
2015/01/09 16:07:38
It would be nice if Android specified this in thei
|
+ #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: |