Check languages for Roboto Medium support |
||||||
Issue descriptionMandarin is not rendering in Roboto-Medium weights. Sadness all around! Would be good to check different fonts and see if how pervasive the issue is, and how to resolve it. See related bug: https://bugs.chromium.org/p/chromium/issues/detail?id=701859#c14
,
May 27 2017
Related? On English language pages (e.g. console.cloud.google.com), Roboto is being rendered using Roboto Thin instead of Roboto Medium.
,
May 27 2017
Sorry, I think my issue was an incompatibility between Linux fontconfig and the metrics reported by Roboto (cf. https://github.com/andreasf/Roboto, https://bugzilla.redhat.com/show_bug.cgi?id=706559#c11).
,
Jun 23 2017
Seems like Material supports weight via the "Noto" font for Chinese and other non-Latin character based scripts—Roboto doesn't. https://material.io/guidelines/style/typography.html#typography-typeface I wonder if it makes sense to flip over to Noto medium in these cases.
,
Jun 23 2017
Or just Noto when using non-Latin chacacters, in general.
,
Jun 24 2017
Interesting, does Android use Noto for similar use cases?
,
Jun 26 2017
Android doesn't seem to bundle in the Noto font, so that's a dead end. I doubt anyone would want to include that huge font in our APK just to fix the medium vs bold issue.
,
Jun 27 2017
Ah I mis-read this as the font not rendering at all, vs just for Medium. I agree using bold instead like we currently do is a safe fallback. Thanks!
,
Jun 27 2017
More concretely: https://stackoverflow.com/questions/19691530/valid-values-for-androidfontfamily-and-what-they-map-to android:fontFamily="sans-serif" // roboto regular android:fontFamily="sans-serif-light" // roboto light android:fontFamily="sans-serif-condensed" // roboto condensed android:fontFamily="sans-serif-thin" // roboto thin (android JB MR1 4.2) android:fontFamily="sans-serif-medium" // roboto medium (android >= L) The four places we correctly use "RobotoMediumStyle", which flips between Roboto Medium (>= L) and Roboto Bold (<= KK), are here: Data reduction footer in the menu: chrome/android/java/res/layout/data_reduction_main_menu_footer.xml Download manager filter selector: chrome/android/java/res/layout/download_manager_spinner.xml Download manager space display: chrome/android/java/res/layout/download_manager_ui_space_widget.xml Search engine list in preferences: chrome/android/java/res/layout/search_engine_recent_title.xml These places use "sans-serif-medium", which need to use RobotoMediumStyle because they are just plain "sans-serif" on JB and KK (see attachments for example differences): Account sign-in: chrome/android/java/res/layout/account_signin_view.xml Contextual search: chrome/android/java/res/layout/contextual_search_peek_promo_text_view.xml Contextual search: chrome/android/java/res/layout/contextual_search_promo_view.xml FRE data saver toggle: chrome/android/java/res/layout/fre_data_reduction_proxy.xml Incognito NTP "learn more" link: chrome/android/java/res/layout/new_tab_page_incognito.xml Incognitp NTP "learn more" link: chrome/android/java/res/layout/new_tab_page_incognito_md.xml Chrome photo picker: chrome/android/java/res/layout/photo_picker_bitmap_view.xml Snackbars: chrome/android/java/res/layout/snackbar.xml Preference categories: chrome/android/java/res/values-v21/styles.xml Search geolocation disclosure: chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationSnackbarController.java Website preferences: chrome/android/java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java Sync errors: chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java Autofill keyboard: components/autofill/android/java/res/layout/autofill_keyboard_accessory_item.xml
,
Jun 27 2017
Here's how the KK version of the NTP changes when you switch to using Roboto bold. Planning on switching (almost all) existing use cases of sans-serif-medium over to RobotoMediumStyle so that it looks more correct. I'm leaving the autofill keyboard accessory alone for now.
,
Jun 27 2017
Example screenshots for the upcoming CL, showing how Chrome on KK looks before and after the bold font fixes. I couldn't figure out how to trigger many UI components, but you can get the gist of the changes here.
,
Jun 27 2017
Once https://chromiumcodereview.appspot.com/2962713002/ lands, we'll have a more unified set of locations to change to address the original issue. In addition to the Sogou promo dialog, this bug affects pretty much every place we have buttons and many places where we have headers on Lollipop and up (JB & KK will be unaffected because they use bold text). Here are some gross/painful workarounds, off the top of my head: 1) Use Roboto Bold instead of Roboto Medium, regardless of OS vesrion. 2) Explicitly mark each non-Latin character based locale as using Roboto Bold. This is untenable and will likely bloat up the APK.
,
Jun 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324 commit 0ecc34d1d8105c25cfd423cb21814fcb7e9bc324 Author: dfalcantara <dfalcantara@chromium.org> Date: Wed Jun 28 00:20:52 2017 Fix inconsistent and incorrect Roboto Medium usage A bunch of places are using sans-serif-medium, which doesn't exist before Lollipop. This means that text that is supposed to be bold ends up looking like all of the other text around it. * Replace users of sans-serif-medium with RobotoMediumStyle, which automatically flips between Roboto Medium and Roboto Bold as the platform allows. * Make everywhere that dynamically builds Typefaces/StyleSpans use a common function in UiUtils, which now references the font name and weight directly so that it's more obvious why it's needed. * ContextualSearchPromoView no longer tries to change its buttons' fonts, which buttons shouldn't do. * Remove the dead NativePageDialog. BUG=703968 Review-Url: https://codereview.chromium.org/2962713002 Cr-Commit-Position: refs/heads/master@{#482814} [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/account_signin_view.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/contextual_search_peek_promo_text_view.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/contextual_search_promo_view.xml [delete] https://crrev.com/60c1155a854f8df1eead65b636bfac07729f85aa/chrome/android/java/res/layout/dialog_with_titlebar.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/fre_data_reduction_proxy.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/new_tab_page_incognito.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/new_tab_page_incognito_md.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/photo_picker_bitmap_view.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/layout/snackbar.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/values-v17/styles.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/values-v21/styles.xml [delete] https://crrev.com/60c1155a854f8df1eead65b636bfac07729f85aa/chrome/android/java/res/values-v21/values.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/res/values/values.xml [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java [delete] https://crrev.com/60c1155a854f8df1eead65b636bfac07729f85aa/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageDialog.java [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationSnackbarController.java [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/chrome/android/java_sources.gni [modify] https://crrev.com/0ecc34d1d8105c25cfd423cb21814fcb7e9bc324/ui/android/java/src/org/chromium/ui/UiUtils.java
,
Jun 28 2017
Hannah: thoughts on #12? Didn't want the comment to get lost behind the CL landing.
,
Jun 30 2017
Sending to Ted for triage.
,
Jul 10 2017
It's not ideal but I think using Roboto Bold is the only viable short term solution here until Mandarin is supported in Roboto-Medium. Can we make sure that the Material/Fonts team is aware of this?
,
Aug 23 2017
,
Sep 18 2017
> It's not ideal but I think using Roboto Bold is the only viable short term solution here until Mandarin is supported in Roboto-Medium. Can we make sure that the Material/Fonts team is aware of this? There is no plan to extend Roboto's script coverage beyond Latin-Greek-Cyrillic(LGC). Note that Noto Sans font family for non-LGC does support medium weight along with other weights for CJK (Noto Sans CJK). Upcoming new release of Noto Sans font family for scripts other than CJK and LGC also support multiple weights. (see http://www.google.com/get/noto ). However, currently, Android devices are shipped with just one weight of Noto Sans CJK (Noto Sans CJK Regular). 'bold' is made on the fly with an faux bolding. This will change over the time. More weights of Noto font families - both Sans and Serif will be bundled with Android devices (most likely in the form of variational fonts). For instance, Android O has one script (Khmer) supported via a new opentype font technology (variational font; VF) that allows a single physical font file to support multiple (theoretically infinite) weights and multiple (ditto) width. This Khmer VF is larger than a single-weight/single-width font but infinitely smaller than the sum of the sizes of all those single-weight/single-width font files covering 'infinitely many' weights and widths. And it's certainly much smaller than the sum of the sizes of single-weight/single-width fonts covering the weight/width spectra of Roboto.
,
Nov 1 2017
,
Feb 15 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dfalcant...@chromium.org
, Mar 22 2017Status: Assigned (was: Untriaged)