Adding font-display property to Google Font s

Now that Google has added a way to set the font-display CSS property for their webfonts (https://addyosmani.com/blog/google-fonts-font-display/) I am looking for a way to include this in my Google fonts added through the customizer with the BB Theme.
I tried using the fl_font_subset filter but that seems to only work for subsets not other query parameters.
Essentially what I need to do is add &display=swap to the end of the url that is enqueued.
Any suggestions?

Thank you

There will be a new filter in the next revision to add args to the google fonts url, so you can add display or effect or whatever else you want. Keep an eye on the changelogs.

1 Like

Awesome. Looking forward to it.
thanks

Was this update presented already? It will be great to use it. But can I use not only Google Fonts? Can you tell me how I can use such fonts as Dark Ages http://fontsly.com for example

Yes the filter fl_builder_google_font_args was added back in June.

For example:

add_filter( 'fl_builder_google_font_args', function( $args ) {
	$args['effect'] = 'fire';
	return $args;
} );

now add class font-effect-fire to a module heading with your google font selected and it’ll be on fire.

https://developers.google.com/fonts/docs/getting_started#enabling_font_effects_beta