x converted to math symbol in location/URL bar
Categories
(Firefox :: Address Bar, defect)
Tracking
()
People
(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)
Details
Steps to reproduce:
With gsettings-desktop-schemas 47~alpha-1, Debian sid/unstable switched to the font Inter.
Actual results:
Now in Firefox in the location bar, if there is an x between two numbers, it’s rendered as the multiplication sign ×.
Expected results:
No such conversion should happen in the location bar.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
This is simply a feature built into the Inter font (as the calt "Contextual Alternates" OpenType feature), as can be seen on the Google Fonts page for the font: https://fonts.google.com/specimen/Inter?preview.text=x,%20axb,%201x2,%203%20x%204,%20-5%20x%206,%207%20x%20-8. Note how whenever the letter x occurs between digits (with or without intervening space), it renders as the symbol × (but not in the case where the following number is negative -- the contextual rule in the font isn't "smart" enough to recognize that).
We could explicitly disable Contextual Alternates, but that will also disable whatever other adjustments the font designer has provided in this feature -- for example, Inter also uses it to adjust the height of the + and - characters when they appear between uppercase letters or digits, to better align with the visual axis of the text, and there may be other similar details.
So this is not a Core::Layout bug; Gecko is rendering the font exactly as designed. Deciding to override the default font features for the location bar would be a UX/front-end issue; moving this to the Address Bar component for consideration (though I'm not convinced we should do anything to change it; we're simply rendering the font as its designer intended).
Comment 3•1 year ago
|
||
I agree with Jonathan, if you're picking a font with a specific behavior it should be respected, otherwise you could pick a different font.
Unless a clear use-case for which this is bad or creating actual issues to the user is presented, I think this is a wontfix.
So please let us know why you think respecting the font feature is likely to be an issue.
| Reporter | ||
Comment 4•1 year ago
|
||
As written, this is going to be GNOME’s new default font. I do not know how fonts work, but would expect that certain conversions are not done for URLs.
Comment 5•1 year ago
|
||
I tried installing Debian unstable in a VM, but I don't seem to be getting the Inter font by default; what I'm seeing looks like Cantarell. Do I need to choose a particular desktop theme or something, in order to reproduce this? (Apologies if this should be obvious, but I'm not normally a Debian user and know essentially nothing about how it's configured.)
| Reporter | ||
Comment 6•1 year ago
|
||
Latest gsettings-desktop-schemas in unstable should show it. What version does dpkg -l gsettings-desktop-schemas show on your system?
Did you run sudo apt update && sudo apt upgrade?
Comment 7•1 year ago
|
||
(In reply to Paul Menzel from comment #6)
Latest gsettings-desktop-schemas in unstable should show it. What version does
dpkg -l gsettings-desktop-schemasshow on your system?
47~alpha-1
Did you run
sudo apt update && sudo apt upgrade?
Yes -- well, more precisely: based on the instructions at https://wiki.debian.org/DebianUnstable#Installation, I installed a minimal stable image, then (as root) changed apt-sources to point to unstable, and ran apt update and apt full-upgrade.
| Reporter | ||
Comment 8•1 year ago
|
||
(In reply to Jonathan Kew [:jfkthame] from comment #7)
(In reply to Paul Menzel from comment #6)
Latest gsettings-desktop-schemas in unstable should show it. What version does
dpkg -l gsettings-desktop-schemasshow on your system?47~alpha-1
That is the right version. Maybe the font is not installed? Does dpkg -l fonts-inter-variable show it as installed?
Comment 9•1 year ago
|
||
Yes, it's installed (dpkg reports it as version 4.0+ds-1); fc-list | grep Inter also shows that it's present, with the name "Inter Variable" and a bunch of style instances.
| Reporter | ||
Comment 10•1 year ago
|
||
From Inter as default interface font, what does
gsettings get org.gnome.desktop.interface font-name
show, and does
gsettings set org.gnome.desktop.interface font-name 'Inter Variable 11'
work?
Comment 11•1 year ago
|
||
Aha, progress! Sorry for all the back-and-forth here. Looks like my issue wasn't with the gnome settings at all -- gsettings confirmed it was already Inter -- but I was just running the version of Firefox that came with the distro, and that doesn't seem to use the desktop UI font.
When I downloaded and tried the latest Nightly build instead, I do see Inter being used in the Firefox UI, and so the contextual change of "x" in the URL bar happens, just as you describe.
(Not sure why the older Firefox build isn't picking up the same font -- perhaps the package was explicitly configured to use Cantarell -- but that's beside the point here; I'm now seeing the same thing as you.)
I agree it seems a bit odd for "x" to change like this in the location bar, but I still don't think it's really Firefox's job to override font behavior. Note that the same contextual display happens in other contexts in the UI: e.g. I created a folder with "1x2" in its name, and the same thing happens when I view it in the Files application (whether just viewing the icon with its caption, or editing the path in the Files location bar), or in the Open File dialog of another app, etc.
So as far as I can see, this behavior is pervasive throughout the UI, and Firefox is simply conforming to the host system's design. Whether it's a good idea to choose a UI font that does this kind of thing may be questionable, but I think it's a question for the Gnome designers, not for Firefox.
| Reporter | ||
Comment 12•1 year ago
|
||
Thank you for reproducing this and digging into this. I forwarded your comment. I agree, that it’s not special to Firefox, so I am closing this issue.
| Reporter | ||
Comment 13•1 year ago
|
||
Maksym commented:
It turns out that the
caltfeature is not enforced by the font itself (fonts can't do that), but by every application/toolkit individually — as they should by the spec.
Description
•