FontSubstitutes does not work in DirectWrite
Reported by
jha...@gmail.com,
May 19 2017
|
|||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Example URL: Steps to reproduce the problem: 1. Map Segoe UI to Tahoma in the Windows registry key via FontSubstitutes. 2. Use `font-family: system-ui` in CSS. What is the expected behavior? Tahoma is used. What went wrong? A serif (Times New Roman?) font is used, as if system-ui didn't exist. Does it occur on multiple sites: N/A Is it a problem with a plugin? N/A Did this work before? No Does this work in other browsers? N/A Chrome version: 56 Channel: n/a OS Version: 10 Flash Version: Shockwave Flash 25.0 r0 See https://github.com/Microsoft/vscode/pull/25570#issuecomment-302182205 system-ui is used to get the system font which is also used for menus. But a user noticed, that it won't work with FontSubstitutes on Windows.
,
May 29 2017
Thanks for filing the issue. jhasse@, Could you please provide any sample test /html file to triage the issue from TE end.
,
Jun 14 2017
Yes: <p style="font-family:system-ui">Foobar</p> <p style="font-family:Tahoma">Foobar</p>
,
Jun 14 2017
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 19 2017
jhasse@, Thanks for the reply. As per comment#3,created html file & executed the file in browser.Unable to reproduce the issue on Windows 7, 10, Mac 10.12.5 & Ubuntu 14.04 using latest stable#59.0.3071.104 & Canary#61.0.3134.0. Could you please check the issue by upgrading to the latest chrome stable/ canary versions & let us know your observations on the same. Please find the attached screenshot & let us know if we miss any steps to reproduce the issue.
,
Jun 19 2017
Did you see my first step? "1. Map Segoe UI to Tahoma in the Windows registry key via FontSubstitutes." Did you do that first? Also note that this bug is Windows only.
,
Jun 19 2017
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 19 2017
,
Jun 21 2017
Tested this issue on Windows 10 with chrome #56.0.2924.87, #59.0.3071.109 These are the steps followed 1. Map Segoe UI to Tahoma in the Windows registry key via FontSubstitutes using following url "https://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/how-to-change-system-default-font-in-all-parts/dfce15db-7337-420a-a42e-517521a8502e" 2. As per comment#3,created html file & executed the file in browser Observed that in both M-56, M-59 versions, Tahoma font is used. Attaching the screenshots for reference. jhasse@ could you please look into it and let us know any steps/settings i have missed while reproducing the issue. Thank You...
,
Jun 21 2017
I also can't reproduce the Times New Roman font which appears here: https://github.com/Microsoft/vscode/pull/25570#issuecomment-302208073 I'll ask there if manu-silicon knows the exact steps he did to change the system font to Tahoma. But system-ui is still not respecting FontSubstitutes correctly, I'll try to explain what I mean: Someone would want to add the FontSubstitute rule to change their UI font in Windows. The font alias system-ui should reflect that, as it is used for getting the UI font of the underlying system (to match other Windows applications or the context menus). In your screenshots you can see that the font in the tab title is Tahoma, the same as the font in regedit.exe or Chrome's context menu. But the first "Foobar" is not using Tahoma which can be seen when comparing it with the second "Foobar": They don't look the same, although they should.
,
Jun 21 2017
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 22 2017
jhasse@ Could you please help us with the preconditions and expected screenshot of this issue for further triage. Thank You...
,
Jul 28 2017
Sorry for the late response. Attached you'll find a new test file with an expected screenshot and the actual result.
,
Jul 28 2017
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 31 2017
,
Jul 31 2017
Updating labels and removing from bisect bucket since TE cannot repro.
,
Sep 4 2017
If I'm reading the bug correctly, this issue is not only for 'system-ui' but also for 'Segoe UI' too. From the screenshot in #9, it looks like registry was removed only partially (i.e., regular, bold, italic, and bold italic were removed but other variants such as black, light are still there.) Can you try removing the whole family?
,
Sep 4 2017
I removed the whole family and that resulted in a serif font being used (see the attached screenshot).
,
Sep 4 2017
#18: Thank you for testing. Revised the summary again. eae@, could you mind to advice? Further testing indicate that FontSubstitutes registry doesn't seem to work at all in DirectWrite. * #18 indicates it doesn't work for "Segoe UI". * FontSubstitutes tests in src/ui/gfx/platform_font_win_unittest.cc use GDI CreateFontIndirect(), so it doesn't cover DWrite. * Debugged FontCache::GetFontData for existing entries; e.g., "MS Shell Dlg" or "Tms Rmn". SkFontMgr_DirectWrite::onMatchFamily() returns nullptr because fFontCollection->FindFamilyName() returns !exists. * If we go SkFontMgr::legacyCreateTypeface(), we can create the SkTypeface because it goes GDI (though we fail to match family name for a different reason.) Questions: 1. Happen to know if this is supposed to work in DWrite? 2. If so, I have 3 possible ways to go: a. Blink should fallback to legacyCreateTypeface() if matchFamilyStyle() failed. b. Skia should be able to find font names in FontSubstitutes entries. c. dwrite_font_proxy_win.cc should be able to find font names in FontSubstitutes entries. Do you have any thoughts which one is the best to tackle first?
,
Sep 28 2017
We need to find a new solution to handle FontSubstitutes now that we can't go down the GDI route. There might be a DW API we can use but I suspect we'll have to scan the list of substitutes and do it ourselves.
,
Sep 28
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 28
|
|||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||
Comment 1 by nyerramilli@chromium.org
, May 24 2017