-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabular figures #27
Comments
Thanks! This is something the brand team has acknowledged as a potential future feature. Keeping this issue open for visibility. |
I second @jkelstrup proposal. In the meantime, do you have any recommendations about which font to use for numbers when tabular spacing is needed? I have tried some of the common web safe solutions ( Thank you! |
@kelvah I would probably go with Open Sans for tabular figures. I'm betting that most people won't notice. |
It should be possible to do a hotfix workaround until RedHatText has proper tabular numbers. Something like this: https://www.client9.com/css-georgia-font-stack-with-tabular-numbers/ but with different fonts. Either with Open Sans (which means shipping and including another font, as we cannot rely on it being installed on the system) or finding system fonts with tabular numbers that match well enough on Linux, Windows, and macOS. Of course, that would just be a workaround until the Red Hat font is enhanced. |
I used a subset of Open Sans for numbers in Cockpit and found that the metrics aren't close enough. Around 14px on a standard DPI monitor they were pretty close — probably good enough, really. At around 16px, glyphs of Open Sans were taller in Firefox and Chrome even displayed the Open Sans glyphs both higher and lower than Red Hat Text. The larger the text, the worse it became, of course. I did try If we're going to do a font subset of patching things in, it should probably be...:
|
For an illustration of the issue in action, in Cockpit, we're hitting alignment problems on PatternFly 4 graphs as the numbers on the Y axis are all right-aligned and also proportional: Look at how wrong that 1 looks in-between the much-wider 0 and 2. We're also having similar alignment issues elsewhere in Cockpit, especially when digits after a decimal point are displayed. |
@garrett @jkelstrup @kelvah Tabular numbers have been added. |
@jeremymickel: Thank you so much for all the updates! I can't wait to use all the new features. 🥳 (Meanwhile, I just opened an issue requesting that PatternFly update the version of the fonts @ patternfly/patternfly#4021) |
Thank you @jeremymickel! And we got variable fonts too! 🎉 |
As far as I can tell, Red Hat Font offers proportional figures only, it would be super nice if tabular figures was available as well. Maybe as an OTF feature.
I realize that some tweaking of the design of the figures is necessary to do this right. It wouldn't look right to just make the current figures monospaced.
Thank you for considering this!
The text was updated successfully, but these errors were encountered: