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

Jetbrains Mono - 400, 500, 700 specific stylesheets give an error #91

Closed
austriker27 opened this issue Nov 18, 2020 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@austriker27
Copy link

austriker27 commented Nov 18, 2020

Describe the bug
I'm not able to load the 400, 500, and 700 weights specifically via their respective stylesheets in JavaScript. I've used this same technique to load specific font weights from Inter (open source) and Sora (google font) via fontsource.

To Reproduce
Steps to reproduce the behavior:

  1. install fontsource-jetbrains-mono (I'm using yarn if that matters)

  2. Add stylesheets to JavaScript:

import 'fontsource-jetbrains-mono/400.css'
import 'fontsource-jetbrains-mono/500.css'
import 'fontsource-jetbrains-mono/700.css'
  1. Console error:
    Module not found: Error: Can't resolve 'fontsource-jetbrains-mono/400.css'
    Module not found: Error: Can't resolve 'fontsource-jetbrains-mono/500.css'
    Module not found: Error: Can't resolve 'fontsource-jetbrains-mono/700.css'

Expected behavior
I expected those weights to load based on the Fontsource page here that says they are available.

If I do a generic import (import 'fontsource-jetbrains-mono') there is no error.

@austriker27 austriker27 added the bug Something isn't working label Nov 18, 2020
@ayuhito
Copy link
Member

ayuhito commented Nov 19, 2020

Hey @austriker27, thanks for checking in.

#92 should address why this issue exists and that it is on the agenda to be fixed. If you refer to the package readme on NPM or GitHub, it has a filler subset called 'all'.

The current method to import this would be:

import 'fontsource-jetbrains-mono/all-400.css'
import 'fontsource-jetbrains-mono/all-500-normal.css'
import 'fontsource-jetbrains-mono/all-700-italic.css'

I'll be closing this for now since #92 will address how to improve the issue you're seeing.

@ayuhito ayuhito closed this as completed Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants