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

Issue 803624 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

String "Custom" appears instead of font name in chrome://settings/fonts

Project Member Reported by mfo...@chromium.org, Jan 18 2018

Issue description

Chrome Version: Version 64.0.3282.99
OS: Linux

What steps will reproduce the problem?
(1) Change default font in chrome://settings/fonts
(2) Reopen chrome://settings/fonts
(3) View dropdown

What is the expected result?

The font name is displayed in the dropdown

What happens instead?

The string "Custom" appears - "Custom" is not the name of the font. I cannot tell what font has been chosen.

If you tell me what key to search for, I can try to find out what font is set in my Preferences.

See screen shot:
https://photos.app.goo.gl/rigqDG4lSTgMCxch1


 

Comment 1 by dpa...@chromium.org, Jan 20 2018

Cc: dschuyler@chromium.org
I was not able to reproduce. @dschuyler: Do you know when do we display the "Custom" string, instead of the name of the font?

Comment 2 by dpa...@chromium.org, Jan 20 2018

It seems that "Custom" is displayed when the pref's value is not one of the enumerated fonts, see logic at [1].

@mfoltz: The pref names you are looking for are
webkit.webprefs.fonts.standard.Zyyy and
webkit.webprefs.fonts.serif.Zyyy

[1] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/controls/settings_dropdown_menu.html?dr&l=38-41
IIRC, "custom" will be shown when the value is not found in the dropdown.

Guesses: 
- maybe the font has an empty name
- maybe the font has a name that doesn't match the pref value
- maybe there's a bug in UI code
- maybe the font was removed from the system or became corrupted (between steps (1) and (2)).

It would help to test with the same font. mfoltz@ do you recall which font was being switched to?
possibly relevant discussion in issue 729477

It's possible the pref value is a comma-separated list of font names.

Looks like Bell Gothic btw.

Comment 5 by mfo...@chromium.org, Jan 22 2018

@2: I didn't see any pref keys with those names in Preferences.  Is there somewhere else I should be looking?

Is it possible I set the custom fonts to Mac-only fonts that are not available on Linux, and Chrome sync has copied my Mac font preferences to my profile on Linux?
Components: -UI>Accessibility
FYI: "Custom" is essentially saying that the font name was not found in the list (sorry if that was obvious). 

See
https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/controls/settings_dropdown_menu.js?type=cs&q=showNotFoundValue_&sq=package:chromium&g=0&l=138

Comment 8 by mfo...@chromium.org, May 30 2018

Yes - I gathered that from the earlier discussion.

What I guess I don't understand is how it could end up that way since I must have picked a font from the dropdown earlier.

"Custom" doesn't exactly tell me anything useful about the font that is being used on this particular Chrome profile.  And it's unclear how my font selection would affects other profiles signed into the same sync account (would they also show "Custom")?




Sorry, yeah #7 wasn't adding anything. Let me make another attempt to be more helpful.

Off the top of my head, I think...

It could happen if font A is selected and then later:
- font A is removed from the machine.
- font A becomes corrupted and isn't loaded by the os
- the name of font A changes

Or it could happen if the font is a comma separated list of fonts (which won't match any individual font).

Or if the default font is blank (since fonts would have names). 

I asked Tommy about how to tell if a pref is synced. If the pref is registered with PrefRegistrySyncable::SYNCABLE_PREF then it will be synced. It will take more searching around to determine if the fonts are synced.
Should the preference revert to "Default" in those cases?
Labels: Proj-MaterialDesign-WebUI
Owner: bettes@chromium.org
Status: Assigned (was: Untriaged)
bettes@,

#10, I'll agree that "custom" is not a perfect fit, but I'm not convinced that "default" would be better. 

Also consider: this same result is used for font sizes, where the font size is not listed in the drop down.

Maybe it would be better to temporarily add whatever the current value is, e.g. add that font size or that font name in the drop down temporarily.

Or maybe there's a better word than "custom".

I'm sending this issue to bettes@ to get their input how this UI should look/behave when the specific setting is not found in the drop down list. bettes@, let me know if you'd like more context or more screen shots.

Sign in to add a comment