diff options
author | Raph Levien <raph@google.com> | 2014-09-23 16:17:41 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-23 16:17:41 +0000 |
commit | 60cc2ccf68058f3d3ff1c0a863ef796ad388eed5 (patch) | |
tree | cb790a95aebb671e63483ec3edcaa75ceb03d462 | |
parent | 9f00aaec705f667fc62710c5b1cd2cb8d005e1d5 (diff) | |
parent | d5804e3937a961736e5cef0e8a70eacf91ee00bb (diff) | |
download | android_frameworks_minikin-60cc2ccf68058f3d3ff1c0a863ef796ad388eed5.tar.gz android_frameworks_minikin-60cc2ccf68058f3d3ff1c0a863ef796ad388eed5.tar.bz2 android_frameworks_minikin-60cc2ccf68058f3d3ff1c0a863ef796ad388eed5.zip |
am d5804e39: Fine-tune fake-bolding condition
* commit 'd5804e3937a961736e5cef0e8a70eacf91ee00bb':
Fine-tune fake-bolding condition
-rw-r--r-- | libs/minikin/FontFamily.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/minikin/FontFamily.cpp b/libs/minikin/FontFamily.cpp index ab6ba20..f688a33 100644 --- a/libs/minikin/FontFamily.cpp +++ b/libs/minikin/FontFamily.cpp @@ -141,11 +141,11 @@ static int computeMatch(FontStyle style1, FontStyle style2) { } static FontFakery computeFakery(FontStyle wanted, FontStyle actual) { - // If desired weight is bold or darker, and 2 or more grades higher - // than actual (for example, medium 500 -> bold 700), then select - // fake bold. + // If desired weight is semibold or darker, and 2 or more grades + // higher than actual (for example, medium 500 -> bold 700), then + // select fake bold. int wantedWeight = wanted.getWeight(); - bool isFakeBold = wantedWeight >= 7 && (wantedWeight - actual.getWeight()) >= 2; + bool isFakeBold = wantedWeight >= 6 && (wantedWeight - actual.getWeight()) >= 2; bool isFakeItalic = wanted.getItalic() && !actual.getItalic(); return FontFakery(isFakeBold, isFakeItalic); } |