New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 824875 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

gfx::RenderText should apply fallback fonts by character, not text run

Project Member Reported by jose.dap...@lge.com, Mar 22 2018

Issue description

Chrome Version: 64.0.3282.186
OS: Ubuntu 17.10

What steps will reproduce the problem?
(1) Open chromium
(2) Write on omnibox ± (copy symbol from the bug report if needed).
(3) Write on omnibox ⅜ so the total text i omnibox is ±⅜

What is the expected result?

Both characters are rendered properly. Font visible for ± is the same when showing ± and when showing ±⅜

What happens instead?
On writing ⅜, the font for ± changes.±


 

Comment 1 by jose.dap...@lge.com, Mar 22 2018

Attached captures before and after writing ⅜
Captura de pantalla de 2018-03-22 19-28-48.png
727 bytes View Download
Captura de pantalla de 2018-03-22 19-28-24.png
1.1 KB View Download

Comment 2 by jose.dap...@lge.com, Mar 22 2018

Also happening on ToT.
Components: UI>Browser>Omnibox
Cc: mukai@chromium.org x...@chromium.org
Labels: Hotlist-Polish
xdai@ and mukai@, is this still your area?

Comment 5 by x...@chromium.org, Apr 12 2018

I don't work on font rending related area any more.
Does mukai@?  Or do you know who does these days?

Comment 7 by mukai@chromium.org, Apr 12 2018

Surely kinda my area, but I'm not actively working on this either.

By the way, it does not reproduce on my environment -- and I guess it's very likely to be depending on the used font. What font is used here, and also wondering if this is chrome specific -- is this not happening on other applications like gedit?

Comment 8 by jdap...@gmail.com, Apr 12 2018

I could not reproduce it in gedit, but I agree it depends on the font.

The reported test case was using Chromium X11 64 stable on Ubuntu 17.10. But I just tested and it is also happening in 65.

I think the Chromium X11 fonts are controlled in Chromium side?

I tried on gedit and epiphany and could not reproduce the issue. Also, the issue only happens on aura controls in Chromium, but not on web contents. But I don't know the font Chrome is using by default for omnibox (that does not seem to be gnome shell font).

Comment 9 by mukai@chromium.org, Apr 12 2018

Chromium chooses the font through fontconfig, but the choosing mechanism might be different from standard Gtk3 apps like gedit. It would be helpful if you find out which font is used there -- but I guess your system has tons of pre-installed fonts.

I'm also wondering if this is omnibox only or for whole chrome (i.e. happening within web contents). You could open a tab like data:text/html,<textarea>%C2%B1</textarea><br><textarea>%C2%B1%E2%85%9C</textarea> to check this.

Comment 10 by mukai@chromium.org, Apr 12 2018

Cc: msw@chromium.org
I think +msw should have insights on this area.

Comment 11 by msw@chromium.org, Apr 13 2018

Cc: tapted@chromium.org osh...@chromium.org warx@chromium.org
Components: -UI>Browser>Omnibox UI>GFX Internals>Views
Status: Available (was: Untriaged)
Summary: gfx::RenderText should apply fallback fonts by character, not text run (was: Chromium aura text entries: font changes adding ⅜ to ±)
It's probably specific to View textfields, which apply fallback fonts by text run, rather than per-character (like Blink).
If the font used for ± doesn't have a glyph for ⅜, then both will be rendered with a fallback font that has glyphs for both.

This is 'by design' of the gfx::RenderText system, though I think we've decided that per-character fallback would be better.
Morphing this bug to loosely track the effort to implement per-character fallback in views::Textfield/gfx::RenderText.
No one is actively working on this area, and a low severity bug like this probably won't be fixed anytime soon.
Maybe we could help implementing this... But at least for considering that, it'd would be good to have some explanation of where this dependency is introduced, and some hints on how to move the implementation to consider glyph fallbacks per char.

Comment 13 by msw@chromium.org, Apr 13 2018

Cc: asvitk...@chromium.org
ui/gfx/render_text_harfbuzz.cc and apparently ui/gfx/font_fallback.h
It's likely not a simple change. Alexei's had related ideas in the past about fallback and caching.
Labels: Hotlist-DesktopUIToolingRequired Hotlist-DesktopUIChecked
*** UI Mass Triage ****

Sign in to add a comment