Issue metadata
Sign in to add a comment
|
"system-ui" generic font family |
||||||||||||||||||||||||||||||||||||||||||||
Issue description(See http://www.chromium.org/blink#launch-process for an overview) Change description: This generic font family allows authors to style contents so it fits within the system UI. Changes to API surface: * Add "system-ui" generic font family. Links: https://drafts.csswg.org/css-fonts-4/#valdef-font-family-system-ui Support in other browsers: Internet Explorer: No public signals Firefox: Shipped “-apple-system” for the compat with WebKit. Safari: Shipped “-apple-system”, has a bug to alias to “system-ui”.
,
Oct 12 2016
,
Oct 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bb3db4f221492076bca16af4d6fb9f358b79cedb commit bb3db4f221492076bca16af4d6fb9f358b79cedb Author: kojii <kojii@chromium.org> Date: Tue Oct 18 15:30:15 2016 Enable "system-ui" generic font family This patch enables the "system-ui" generic font family on all platforms. Following changes are planned but not included in this CL: 1. Content sets the current system font to Blink on Linux/CrOS[1]. 2. Remove internal use of "BlinkMacSystemFont" and add UMA[2]. [1] https://codereview.chromium.org/2138613002 [2] https://codereview.chromium.org/2388623002 BUG= 654679 Review-Url: https://codereview.chromium.org/2137483004 Cr-Commit-Position: refs/heads/master@{#425967} [add] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/generic-system-ui.html [add] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/layout-fonts/generic-system-ui-expected.txt [add] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/LayoutTests/platform/mac-mac10.10/inspector-protocol/layout-fonts/generic-system-ui-expected.txt [add] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/LayoutTests/platform/mac-mac10.9/inspector-protocol/layout-fonts/generic-system-ui-expected.txt [add] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/LayoutTests/platform/mac/inspector-protocol/layout-fonts/generic-system-ui-expected.txt [add] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/LayoutTests/platform/win/inspector-protocol/layout-fonts/generic-system-ui-expected.txt [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/FontCache.cpp [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/FontCache.h [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/FontFamilyNames.in [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.h [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMacTest.mm [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp [modify] https://crrev.com/bb3db4f221492076bca16af4d6fb9f358b79cedb/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
,
Oct 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dcc99dfb57774beee88deeb95e8f5753d6d10f8b commit dcc99dfb57774beee88deeb95e8f5753d6d10f8b Author: kojii <kojii@chromium.org> Date: Fri Oct 21 07:11:36 2016 Replace internal uses of BlinkMacSystemFont on Mac with system-ui This patch replaces internal uses of "BlinkMacSystemFont", Blink's non-standard extension on Mac, with the standard "system-ui" generic font family. By eliminating internal uses, the aliasing is moved from FontCache to CSS resolving time. This allows access to the document, which is needed for per-document use counter. BUG=554590, 654679 Review-Url: https://chromiumcodereview.appspot.com/2388623002 Cr-Commit-Position: refs/heads/master@{#426743} [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/LayoutTests/platform/mac/fast/css/css2-system-fonts-expected.txt [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/Source/platform/fonts/FontCache.cpp [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/Source/platform/fonts/FontCache.h [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/third_party/WebKit/Source/platform/mac/ThemeMac.mm [modify] https://crrev.com/dcc99dfb57774beee88deeb95e8f5753d6d10f8b/tools/metrics/histograms/histograms.xml
,
Oct 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14 commit 85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14 Author: kojii <kojii@chromium.org> Date: Tue Oct 25 03:20:40 2016 Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. With this change, all platforms use the correct font. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. On Linux and Chrome OS, gfx::Font() calls LinuxFontDelegate to figure out the current system font. On the default Ubuntu, this resolves to "sans", which Skia resolves to "DejaVu Sans", or "Arial" in run-layout-test. [1] http://crrev.com/2137483004 BUG= 654679 Review-Url: https://codereview.chromium.org/2138613002 Cr-Commit-Position: refs/heads/master@{#427262} [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/content/browser/renderer_host/render_view_host_impl.cc [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/content/common/view_messages.h [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/content/public/common/renderer_preferences.h [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/content/renderer/render_view_linux.cc [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/layout-fonts/generic-system-ui-expected.txt [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/third_party/WebKit/Source/platform/fonts/FontCache.h [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/third_party/WebKit/Source/web/linux/WebFontRendering.cpp [modify] https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14/third_party/WebKit/public/web/linux/WebFontRendering.h
,
Dec 14 2016
Is there any testing needed from TE? If yes please respond to test survey. https://docs.google.com/document/d/1JWSU0DvOaIkcPb4GERyDrdVNgG_G0U0vwRwj4_5tiiY/edit
,
Jan 9 2017
Is there any manual testing needed from Android TE? If so can you please fill out the survey as per #7 ?
,
Jan 18 2017
Sorry I missed #7. 1. Feature implementation status (what is currently working and not working/known issues, ready for testing etc.) The feature is implemented and is ready for testing. Known issues: issue 680979 2. Link to Design Doc: https://docs.google.com/document/d/1BI0OiWRUvsBOuPxPlF5J-_xtUZ49eVDUEXZXoF32ZcM/edit?usp=sharing 3. Link to Test Plan: ( High level testcases,specific setup,flags etc) None. 4. Link to demos (if any): None. 5. Targeted Platforms. Win/Mac/Android/Linux/ChromeOS. 6. What's automated? (Unit tests, API tests, Browser tests) Please provide links to automated tests. https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/inspector-protocol/layout-fonts/generic-system-ui.html 7. Does the feature needs manual testing? The automated test covers the basic cases. 8. Are there any special points of interest from a testing perspective? This feature retrieves the system font family name from the system, and how to do it depends on the platform. Most OS provides an API and Blink relies on it. Android and Linux don't, so Blink relies on heuristics. There are some tools that changes system fonts on Android, such as the one built into Samsung devices, but the behavior is not guaranteed due to the lack of the official API in Android. 9. Is there a mechanism to turn off the feature if it breaks product functionality or performance? No. 10. List UMA stats and coverage to measure stability. It’s highly recommend always adding Stability.Counts and CrashExitCodes.* to your json. No. 11. Any performance impact? Did the feature get tested on perf waterfall? No perf waterfall, the perf impact is highly unlikely. The feature kicks in only when author uses "system-ui" in the font family, and caches the result in the renderer. 12. What is the crbug label for the feature? Blink>Fonts 13. Are there any other team members or mailing lists that should be notified if issues are found? drott@, eae@, layout-dev@chromium.org
,
Jan 26 2017
Chrome on Android TE wrapped up "system-ui" generic font family testing on M56 (56.0.2924.78) Devices covered Sony Xperia C/4.2.2 (arm) Samsung Galaxy Core2(SM-G355M) / KOT49H Predator / LMY47I (X86_64) S6 (SM-G920F) / MMB29K Pixel XL/ NMF26U (arm_64) Blockers issue 680979 and issue 685285 are fixed.
,
Nov 22 2017
From https://docs.google.com/document/d/1BI0OiWRUvsBOuPxPlF5J-_xtUZ49eVDUEXZXoF32ZcM/edit?usp=sharing, I'm afraid Chrome does not pick "UI" fonts (as opposed to 'body/document' fonts ) on Android and Chrome OS when 'system-ui' generic family is specified. (haven't tested yet). Android's fonts.xml has two fallback branches for sans-serif. One is 'elegant' and the other is 'compact'. When there is a distinction between UI fonts and 'body/document' fonts, elegant is for the latter and compact is for the former. For LGC, Roboto is for both, but for a lot of other scripts (e.g. South Asian and SE Asian, Arabic scripts), the distinction matters. "Noto Sans <script name>' is for document/body and 'Noto Sans <script> UI' is for UI. When 'system-ui' generic family is specified, 'Noto Sans <script name> UI' has to be picked instead of 'Noto Sans <script name>'. Is it the case now? Windows also has separate UI fonts. Segoe UI is well known, but does not cover every script. Nirmala UI is for Indic script, Meiryo UI for Japanese, Microsoft {Jheng,Ya}Hei UI for Chinese, etc. Perhaps, on Windows we pick these fonts by default. On Chrome OS (with Noto Sans <script> and Noto Sans <script> UI fonts), there are two ways: 1) add a new font preference for 'system-ui' per script (as is the case for 'sanserif' and 'serif' per script font preference) 2) add a support for a new generic family to fontconfig and refer to it. (I'm raising an issue in fontconfig ml - I've seen a thread on this topic before, but I couldnt' find it). The 2nd method can be used on Linux, too. I think we need to do both. #1 is useful when a user wants to have a fine control over what's used for 'system-ui' generic family via Settings (instead of relying on the default values). I'll file follow up bugs. |
|||||||||||||||||||||||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||||||||||||||||||||||
Comment 1 by kojii@chromium.org
, Oct 11 2016