-
Notifications
You must be signed in to change notification settings - Fork 182
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
Support for font-display #211
Comments
Agreed :) Although you can already achieve that in an ugly way by setting the
will be rendered as: |
@gbreux now a bad fix. Ugly, like you said, but it gets the job done. Thanks! Leaving this open for now, there might be a more elegant way of handling this. |
Hello, I've added For example: {
fontDisplay: 'swap',
googleFonts: [
{
name: "Noto Sans JP",
styles: ["300", "400", "500", "700"]
},
{
name: "Roboto Condensed",
styles: ["700"]
}
]
} Which would generate a url of: |
Hi! I noticed #212 is still open from May 20. Any word on how much longer it might be until it's merged? |
Any thoughts on my PR @KyleAMathews? |
Hi there, just chiming in on this issue and the related PR - we're running perf tests on our site using typography.js and use Hoping it can be merged - unless there's a blocker? |
I apologise if this isn't relevant, but the solution proposed by @gbreux also worked for me while using the Example:
|
Unfortunately the workaround mentioned by @gbreux now results in the following:
I noticed the PR to add an actual option for |
- uses the trick from https://github.com/KyleAMathews/typography.js/issues/211\#issuecomment-494001270 (while the actual feature PR is still not merged)
* Remove italics - decrease the need for fonts to be loaded, italics not needed here really and this does improve readability in the end as well * Add font-display: swap for fontfaces - uses the trick from https://github.com/KyleAMathews/typography.js/issues/211\#issuecomment-494001270 (while the actual feature PR is still not merged)
@ndom91 you just made me waste at least 1 hour 😠 because even though that gets converted it seems it still works fine. Also. seems this project is dead... ☠️😢 |
Well it obviously didn't work for me so we were apparently doing something different. No need to get all angry about it, no one's forcing you to "waste" your time on opensource. |
no worries, I wasn't angry at you. I was just angry at me I guess (was late at night 😂) You say didn't work for you? Do you still see the "warning" saying text should be visible while fonts load? |
Okay good to hear haha. So I ended up not using typography.js actually, so unfortunately I can't comment any further on this specific issue. |
👍 I also want to remove it from my project. Seem like unnecessary extra code that is not being maintained. |
Yeah, if you don't need anythign fancy, just font loading. I suggest you check out Kyle's other |
Does anyone know of any good alternatives to Typography.js that:
|
Google Fonts is adding support for
font-display
. It would be great to add support to Typography.js.More info: https://www.zachleat.com/web/google-fonts-display/
The text was updated successfully, but these errors were encountered: