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

Allow use of display option for google font api #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamcupial
Copy link

google font api started supporting display param as of may 2019 (announced at google io).

I have prepared a change to allow the use of this functionality through webfontloader, changes added also to README and tests.

@terrymun
Copy link

Can't wait to see this being merged in: right now there is no other way to force font-display: swap unless we compose our own custom module/provider 😭

@bdrtsky
Copy link

bdrtsky commented May 21, 2019

Agree. We need font-display option.

@simonjoom
Copy link

simonjoom commented Aug 17, 2019

Thanks! i won 2 points performance in my lighthouse Audit performance with that! That should to be merged. or even no need to add font-display in option, it should to be added for any fonturl. (i think) In the minify code of webfontloaded: i just added it: that's it
(b += "&text=" + encodeURIComponent(a.g)+"&display=swap");

@quicoto
Copy link

quicoto commented Sep 5, 2019

What's the status of the PR?

@HofmannZ
Copy link

It's 2020 we need this!

@adamcupial
Copy link
Author

This repo doesn't look very maintained anymore, if someone needs this functionality just use my fork.

@LucidNeko
Copy link

For what it's worth, &display=swap appears to work if it's specified on the last familiy.

WebFont.load({
  google: {
    families: [
      "Material+Icons",
      "Roboto:300,400,500,700&display=swap",
    ]
  }
}

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

Successfully merging this pull request may close these issues.

7 participants