-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Introducing Inter UI & Fira typefaces #9207
Conversation
Yaaaaaayyyyy ligature support! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable, but I am concerned about how much extra fonts we'll be sending down the wire on initial page load. Ideally these should be cached, but it's possible people haven't set up cache headers properly so they'd eat an extra megabyte or two on every page load.
I'd recommend a couple changes:
- Only include a 3 font weights for each font (thin, normal, bold)
- Update/improve documentation in the config file about how to properly configure static resource caching
@etr2460 I shared this concern as I was implementing this... in fact I went down a rabbit hole of writing LESS conditional mixins to only load the |
ooh, that's good to know. i think this looks fine from my perspective then. Let's make sure we have an action item going forward to standardize on font weights within our less variables file then so that we don't get a weird mix of different types of font stylings (i still think there might be value in limiting the files committed in the repo so no one accidentally uses uncommon font weights, but it's not too big of a deal) |
Is there a plan for updating fonts on the charts? like mass migrating to set |
@williaster My initial thought, for the shorter term, is to just add the new fonts by name to the front of the font stack. Using "inherit" might also work, but could also have ramifications in other (embeded) use cases. By explicitly naming the font, the charts would fall back to their existing font stack when the new font is not available for whatever reason. Longer term, I think the plugins should follow the CSS-in-JS patterns we use for the main repo, and ultimately pull from the same |
======================================================================== | ||
Third party Apache 2.0 licenses | ||
Third party SIL Open Font License v1.1 (OFL-1.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure SIL is apache-comptible? Listed here as "weak copyleft"
https://www.apache.org/legal/resolved.html#weak-copyleft-licenses
CATEGORY
Choose one
SUMMARY
This PR updates the main UI typeface of Superset to Inter UI, and code fonts (e.g. SQL editor) to Fira Code. Both fonts are under the SIL Open Font License, and license information has been added to
LICENSE.txt
to reflect this, as per ASF guidelines.This work is a small step toward SIP-34 (#8976).
Note that the Roboto font (not actually used visibly anywhere) was also removed, in both its binaries and
LICENSE.txt
references.Also note that Fira Code is an extension of Fira Mono. I included that typeface temporarily for when ligatures are turned off, but decided it's better to just use OpenType features to just turn ligatures on/off, rather than loading a different font entirely.
Fira Code is a font that contains handy ligatures that many people love. However, not everyone might love them, so there's a LESS variable called
@use-ligatures
to turn them on or off (they're off by default). If/when we move to a CSS-in-JS approach (See SIP-37, issue #9123), we can make this selection more dynamic, switchable via user preference or deployment config.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
SQL Lab BEFORE (Helvetica + Menlo)
SQL Lab AFTER (Inter UI + Fira Code, ligatures OFF)
SQL Lab AFTER (Inter UI + Fira Code, ligatures ON)
Explore BEFORE (Helvetica)
Explore AFTER (Inter UI - note that viz components are still using other fonts - in this case, Arial)
I've clicked around to other areas, and things are looking OK. Holler if there are any concerns, and I can add additional screenshots.
TEST PLAN
ADDITIONAL INFORMATION
REVIEWERS
@etr2460 @mistercrunch