aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-08-11 16:25:30 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-11 16:25:42 +0000
commit423d1633d1a2ac4e100fb604d7d6b6a9f1aac021 (patch)
tree5199814b9496121b96718adc138b2e0b2abb43fc /src
parentf8f60df0f465f67e927194cf7db04d344bf7e813 (diff)
Revert "Remove subpixel positioning implies no bytecode hinting."
This reverts commit 880768032d7bd1528dc84f5b4408d4fa418bae7d. Reason for revert: Pixel tests, and gfx tests can't handle hinting. Original change's description: > Remove subpixel positioning implies no bytecode hinting. > > SkTypeface_FreeType::onFilterRec currently assumes that if we're asked > to do subpixel positioning, don't do bytecode hinting. The idea was that > both could not be satisfied at the same time, so pick something. This is > no longer true, as with the v40 interpreter it is possible to get > subpixel positioned but bytcode hinted glyphs. > > BUG=skia:6931 > > Change-Id: Ifaeff20c121d6bb4b9287f552e383547eb6d5d49 > Reviewed-on: https://skia-review.googlesource.com/32201 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> TBR=bungeman@google.com,liyuqian@google.com,reed@google.com Change-Id: Idb1ee50d271846bdf962986914f6b75e3aa817c8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6931 Reviewed-on: https://skia-review.googlesource.com/33586 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/ports/SkFontHost_FreeType.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index ca97371837..5af6190d91 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -677,6 +677,11 @@ void SkTypeface_FreeType::onFilterRec(SkScalerContextRec* rec) const {
// collapse full->normal hinting if we're not doing LCD
h = SkPaint::kNormal_Hinting;
}
+ if ((rec->fFlags & SkScalerContext::kSubpixelPositioning_Flag)) {
+ if (SkPaint::kNo_Hinting != h) {
+ h = SkPaint::kSlight_Hinting;
+ }
+ }
// rotated text looks bad with hinting, so we disable it as needed
if (!isAxisAligned(*rec)) {