gfx::RenderText should apply fallback fonts by character, not text run |
|||||||
Issue descriptionChrome 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.±
,
Mar 22 2018
Also happening on ToT.
,
Apr 6 2018
,
Apr 12 2018
xdai@ and mukai@, is this still your area?
,
Apr 12 2018
I don't work on font rending related area any more.
,
Apr 12 2018
Does mukai@? Or do you know who does these days?
,
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?
,
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).
,
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.
,
Apr 12 2018
I think +msw should have insights on this area.
,
Apr 13 2018
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.
,
Apr 13 2018
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.
,
Apr 13 2018
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.
,
Nov 19
*** UI Mass Triage **** |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by jose.dap...@lge.com
, Mar 22 2018727 bytes
727 bytes View Download
1.1 KB
1.1 KB View Download