am 372648a7: Merge "Fix access to freed memory"
* commit '372648a70bbb2778edcdad588c8d133a6c55a033':
Fix access to freed memory
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 621c94a..fc60ef9 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -63,6 +63,16 @@
#define SK_GAMMA_EXPONENT 2.2
#endif
+// hand-tuned value to reduce outline embolden strength
+#ifndef SK_OUTLINE_EMBOLDEN_DIVISOR
+ #ifdef SK_BUILD_FOR_ANDROID
+ #define SK_OUTLINE_EMBOLDEN_DIVISOR 34
+ #else
+ #define SK_OUTLINE_EMBOLDEN_DIVISOR 24
+ #endif
+#endif
+
+
#ifdef SK_DEBUG
#define SkASSERT_CONTINUE(pred) \
do { \
@@ -892,7 +902,7 @@
void SkScalerContext_FreeType::emboldenOutline(FT_Outline* outline) {
FT_Pos strength;
strength = FT_MulFix(fFace->units_per_EM, fFace->size->metrics.y_scale)
- / 24;
+ / SK_OUTLINE_EMBOLDEN_DIVISOR;
FT_Outline_Embolden(outline, strength);
}