create-block-theme icon indicating copy to clipboard operation
create-block-theme copied to clipboard

Manage fonts: Import Variable Font Files

Open bgardner opened this issue 3 years ago • 4 comments

From what I can tell, it is not possible to import variable font files. Is there a plan to build that option into the plugin?

bgardner avatar Nov 11 '22 00:11 bgardner

I second this. ➕

colorful-tones avatar Nov 17 '22 20:11 colorful-tones

Currently, as with any other font file, you can upload the variable font assets using the “Add Local Font” option. Google Fonts is not exposing the variable fonts through the API yet, but you can download the variable version of the font and upload it manually using the "Add local font" option of the plugin.

The plugin will add the font definition and asset just like any other type of font. You can use it just like that or adjust the options related to variable fonts by editing the theme.json file.

A recent article about this: https://themeshaper.com/2022/11/28/how-to-add-typographic-fonts-to-wordpress-block-themes/

matiasbenedetto avatar Dec 01 '22 15:12 matiasbenedetto

Currently, Google Font API seems to expose variable fonts.

google-font

t-hamano avatar Jan 14 '24 12:01 t-hamano

Note: There are typos in the developer documentation, so be sure to use the correct words when trying out the sample request URLs.

variable-fonts

t-hamano avatar Jan 14 '24 13:01 t-hamano

As this plugin now uses the native Font Library to manage fonts, this issue no longer applies.

mikachan avatar Apr 24 '24 10:04 mikachan