Skip to content
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

Add SCSS variables to control included fonts #329

Closed
connor4312 opened this issue Jul 5, 2020 · 4 comments
Closed

Add SCSS variables to control included fonts #329

connor4312 opened this issue Jul 5, 2020 · 4 comments

Comments

@connor4312
Copy link

This is a great font!

I'd like to include it in an Electron app. This means bundling the fonts. Unfortunately, the nice way to import fonts is to go through the @ibm/plex/scss/ibm-plex.scss, which will cause every font to be bundled, which has a pretty heavy disk size. There are nested files, but for example I can't import the "light" base font without also importing cyrillic fonts, which I don't need at the moment. And since I'm targeting Electron, I know I don't need .woff fonts, only woff2.

Of course, I could write create webpack rules that stubs the files I don't need via the null-loader, but a more graceful way would be appreciated 🙂

It would be cool if the imported files were configurable via variables. For example, I could say:

$font-formats: woff2; // only import woff2
$font-weights: bold, regular;
$font-sets: base, latin1, latin2;
@mjabbink mjabbink added impact: high 😱 Affects all users and removed impact: high 😱 Affects all users labels Jul 13, 2020
@mjabbink mjabbink assigned BoldMonday and unassigned BoldMonday Sep 29, 2020
@mjabbink
Copy link
Contributor

@vpicone

@tom-poulin
Copy link

The IBM Engineering Lifecyle Management (ELM) suite has also hit a size issue with bundling the fonts. At 129M, multiplied by each application in the suite, we've added over 1GB of girth to our download files, as reported in 534224: IBM i LICPGM builds are failing due to unexpected increase in IBMi workbench zip file.

@vpicone
Copy link
Contributor

vpicone commented May 26, 2021

@tom-poulin The next major version of Plex resolves this, you can try it out at @ibm/plex@next. There's an overhaul of the scss that's shipped with the package, but if you're authoring your own font-face declarations it should be good to go as a work around.

@tom-poulin
Copy link

@vpicone, is there an ETA for the release of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants