Revert "Remove subpixel positioning implies no bytecode hinting."
This reverts commit 880768032d
.
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>
This commit is contained in:
parent
f8f60df0f4
commit
423d1633d1
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user