Open ghost opened 2 years ago
Hi @0x199x! 👋
It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.
Without a proper reproduction, your issue will have to get closed.
Thank you for your collaboration. 👏
looks fine
chrome Version 100.0.4896.88 (Official Build) (x86_64)
Firefox
Check if you have a rogue extension installed in your FF.
I did actually.. I tested a private browsing window with no extensions enabled.. no change. I just tested on Firefox Android and it looks good. I'm wondering if this could be a Linux font issue.
In my browser dev tools, I modified the body font family .. if I remove -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica
and let it fall back to Arial, it fixes the problem. I removed them one by one to see which was the culprit, and only Arial displays properly for me.
User agent - Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
So I'm not the only one.. thanks Hashen. It does indeed seem to be a Firefox+Linux problem.
Digging a little deeper... I wanted to see what system fonts are actually being used. Firefox Linux uses the Nimbus font as a replacement for -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica
, and Liberation font for Arial,sans-serif
. Vivaldi/Chromium doesn't use Nimbus at all, it renders Liberation no matter what.
So.. the root problem seems to be the use of Nimbus on Firefox Linux
Firefox with DEFAULT font family set (broken):
body {
background-color:#fff;
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;
-webkit-font-smoothing:auto
}
Firefox with MODIFIED font family set (working):
body {
background-color:#fff;
font-family:Arial,sans-serif;
-webkit-font-smoothing:auto
}
In VIVALDI/Chromium with DEFAULT font family set (working), it uses Liberation:
One possible fix for Quasar would be to prioritize Liberation Sans over Helvetica (which aliases to Nimbus). This does fix the issue for me.
This would fix the fonts for all Firefox Linux users, and only have a minuscule impact on whatever tiny number of Windows users who have at some point manually installed Liberation Sans on their systems.. in which case it would prefer Liberation Sans (Arial-like) over Helvetica.
body {
...
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,'Liberation Sans',Helvetica,Arial,sans-serif;
...
}
Also..
If it's of any relevance.. the Nimbus font aliasing comes from the fontconfig
package that ships with nearly all linuxes, so I would suspect that this may be a widespread issue for Linux users. Perhaps Chromium overrides the system aliasing??
Alias similar/metric-compatible families from various sources:
PostScript fonts: URW fonts: GUST fonts: Windows fonts:
====================== ================== ================= ==================
Helvetica Nimbus Sans TeX Gyre Heros
Helvetica Narrow Nimbus Sans Narrow TeX Gyre Heros Cn
Times Nimbus Roman TeX Gyre Termes
Courier Nimbus Mono PS TeX Gyre Cursor
ITC Avant Garde Gothic URW Gothic TeX Gyre Adventor
ITC Bookman URW Bookman TeX Gyre Bonum Bookman Old Style
ITC Zapf Chancery Z003 TeX Gyre Chorus
Palatino P052 TeX Gyre Pagella Palatino Linotype
New Century Schoolbook C059 TeX Gyre Schola Century Schoolbook
Microsoft fonts: Liberation fonts: Google CrOS core fonts: StarOffice fonts: AMT fonts:
================ ====================== ======================= ================= ==============
Arial Liberation Sans Arimo Albany Albany AMT
Arial Narrow Liberation Sans Narrow
Times New Roman Liberation Serif Tinos Thorndale Thorndale AMT
Courier New Liberation Mono Cousine Cumberland Cumberland AMT
Cambria Caladea
Calibri Carlito
Symbol SymbolNeu
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/conf.d/30-metric-aliases.conf
Submitted a PR but this needs some more consideration/testing. It turns out Nimbus is more of a problematic font than I originally thought.. but that's definitely what the issue is.
Github itself is struggling with the same problem. https://github.com/primer/css/issues/1209
It was staring me right in the face and I never noticed it.
See also: https://nolanlawson.com/2020/05/02/customizing-fonts-in-firefox-on-linux/ https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1874842
What happened?
There are a number of problems with vertically centered text in Firefox. Many components are affected, including buttons and nearly all form controls, chips, toolbars, and more. All of the issues are visible in the Quasar documentation as of this writing.
Below are just a few examples.
Left: Vivaldi (Chromium-based), Right: Firefox 99
What did you expect to happen?
Text should be centered vertically
Reproduction URL
https://jsfiddle.net/ap58tdq3/1/
How to reproduce?
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Components (quasar), Style & Identity (quasar)
Platforms/Browsers
Firefox
Quasar info output
Relevant log output
No response
Additional context
No response