New issue
Advanced search Search tips

Issue 824154 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocked on:
issue 765724



Sign in to add a comment

Subpixel text positioning and hinting doesn't update in UI when conditions change

Project Member Reported by agoode@chromium.org, Mar 21 2018

Issue description

The code in ui/gfx/font_render_params_linux.cc doesn't seem to get re-run when external conditions change. This includes the user changing the system font preferences, or the screen moving to/from a hidpi resolution.

Multi-monitor differing-DPI cases don't seem to be handled either.

This results in blurry/incorrect hinting with multi-monitor situations, or poor glyph positioning.
 
Issue 823508 has been merged into this issue.

Comment 2 by e...@chromium.org, Mar 21 2018

Status: Available (was: Untriaged)

Comment 3 by osh...@chromium.org, Mar 22 2018

Owner: malaykeshav@chromium.org
Status: Started (was: Available)
We should be able to remove these conditional change now.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3cf0f7886f3174453e3101bb7d7c3057e761c33

commit e3cf0f7886f3174453e3101bb7d7c3057e761c33
Author: Malay Keshav <malaykeshav@chromium.org>
Date: Tue Apr 24 23:21:18 2018

Disable subpixel positioning on chrome os

Subpixel positioning was needed because text layout was performed at 1x
device scale factor and then rastered to the final display device scale
factor leading to glyph artifacts and inconsistent glyph positioning.
With pixel canvas enabled on chrome os, the text layout is now always
performed at the final display device scale factor. This, coupled with
the replacement of ui scale with display zoom, the text on Chrome OS
is now always rastered with the correct glyph positioning and it no
longer requires subpixel positioning.

Bug:835187,824154, 716662 
Change-Id: Idc0d6c7851308cc26b1d90f74a619e90dadf0112
Component: Text render, subpixel positioning, font

TBR=derat@chromium.org

Change-Id: Idc0d6c7851308cc26b1d90f74a619e90dadf0112
Reviewed-on: https://chromium-review.googlesource.com/1026636
Reviewed-by: Malay Keshav <malaykeshav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553353}
[modify] https://crrev.com/e3cf0f7886f3174453e3101bb7d7c3057e761c33/ui/gfx/font_render_params_linux.cc

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a0a2bf50e63646a399c75fc4af662e82d75814a

commit 1a0a2bf50e63646a399c75fc4af662e82d75814a
Author: Malay Keshav <malaykeshav@chromium.org>
Date: Wed Apr 25 00:37:12 2018

Revert "Disable subpixel positioning on chrome os"

This reverts commit e3cf0f7886f3174453e3101bb7d7c3057e761c33.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Disable subpixel positioning on chrome os
> 
> Subpixel positioning was needed because text layout was performed at 1x
> device scale factor and then rastered to the final display device scale
> factor leading to glyph artifacts and inconsistent glyph positioning.
> With pixel canvas enabled on chrome os, the text layout is now always
> performed at the final display device scale factor. This, coupled with
> the replacement of ui scale with display zoom, the text on Chrome OS
> is now always rastered with the correct glyph positioning and it no
> longer requires subpixel positioning.
> 
> Bug:835187,824154, 716662 
> Change-Id: Idc0d6c7851308cc26b1d90f74a619e90dadf0112
> Component: Text render, subpixel positioning, font
> 
> TBR=derat@chromium.org
> 
> Change-Id: Idc0d6c7851308cc26b1d90f74a619e90dadf0112
> Reviewed-on: https://chromium-review.googlesource.com/1026636
> Reviewed-by: Malay Keshav <malaykeshav@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#553353}

TBR=derat@chromium.org,malaykeshav@chromium.org

Change-Id: I22601786db33c0082480a09e9e7a3905a56a1383
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 835187, 824154,  716662 
Reviewed-on: https://chromium-review.googlesource.com/1026438
Reviewed-by: Malay Keshav <malaykeshav@chromium.org>
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553392}
[modify] https://crrev.com/1a0a2bf50e63646a399c75fc4af662e82d75814a/ui/gfx/font_render_params_linux.cc

Huh?

> Reason for revert: <INSERT REASONING HERE>

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c7df6fa77f0a72173b9bacde5ecaf22ee8b5285b

commit c7df6fa77f0a72173b9bacde5ecaf22ee8b5285b
Author: Malay Keshav <malaykeshav@chromium.org>
Date: Wed Apr 25 20:54:00 2018

Disable subpixel positioning on chrome os

Subpixel positioning was needed because text layout was performed at 1x
device scale factor and then rastered to the final display device scale
factor leading to glyph artifacts and inconsistent glyph positioning.
With pixel canvas enabled on chrome os, the text layout is now always
performed at the final display device scale factor. This, coupled with
the replacement of ui scale with display zoom, the text on Chrome OS
is now always rastered with the correct glyph positioning and it no
longer requires subpixel positioning.

Updates unittests.

Bug: 835187,824154, 716662 
Change-Id: Ibcf6314321777da81335769927d65d52911855df
Component: Text render, subpixel positioning, font
Reviewed-on: https://chromium-review.googlesource.com/1027005
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553738}
[modify] https://crrev.com/c7df6fa77f0a72173b9bacde5ecaf22ee8b5285b/ash/display/display_manager_unittest.cc
[modify] https://crrev.com/c7df6fa77f0a72173b9bacde5ecaf22ee8b5285b/ui/gfx/font_render_params_linux.cc
[modify] https://crrev.com/c7df6fa77f0a72173b9bacde5ecaf22ee8b5285b/ui/gfx/font_render_params_linux_unittest.cc

Comment 9 by agoode@chromium.org, Apr 25 2018

Status: Available (was: Fixed)
Reopening since desktop Linux is still broken.
Blockedon: 765724
Labels: -OS-Chrome
Also, (unless I am misunderstanding) this is basically the opposite result as desired in issue 824150, so please update that bug if it is invalid.
Cc: js...@chromium.org
Cc: agoode@chromium.org
Owner: osh...@chromium.org
#11
 Issue 740385  and Issue 824150 are new to me and I cannot speak for them. Based on the screenshot in 740385 it seems that sub-pixel positioning is something that we want for the webcontent where horizontal hinting is unavailable.

History on why Subpixel positioning was enabled on browser UI:
We were performing text layout at 1.0 device scale factor and then simply scaling the metrics linearly to the final output device scale factor for rasterization. This resulted in incorrect glyph positioning. To correct the positioning to some extent, we had to enable subpixel positioning for all device scale factors > 1.
However we now perform layout directly at the output device scale factor, so subpixel positioning is no longer required to fix artifacts originating from this source.

But based on what is presented in  Issue 740385 , the requirement to disable subpixel positioning may not be required anymore. Instead the logic might have to be updated on when we want to enable/disable it. (+oshima)

Cc: malaykeshav@chromium.org
Status: Assigned (was: Available)

Sign in to add a comment