Title: Problem with local variable fonts
Last modified: June 14, 2023

---

# Problem with local variable fonts

 *  [Gyurmey](https://wordpress.org/support/users/gyurmey/)
 * (@gyurmey)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/)
 * Hello!
 * I noticed that the preview for variable fonts is missing (btw, I also noticed
   that variable fonts are missing size files).
 * I also have some questions.
    1. How to set `font-display` to other values like `swup`? Now the default is `font-
       dispaly: fallback`.
    2. Is it possible to preview (wght font axis, wdth font axis, etc.) after uploading
       the file to the server? Now these settings are only visible once before the 
       file is uploaded to the server.
 * Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Matias Benedetto](https://wordpress.org/support/users/mmaattiiaass/)
 * (@mmaattiiaass)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16818745)
 * Hi, [@gyurmey](https://wordpress.org/support/users/gyurmey/)
   1. Right now we 
   are not adding the fontDisplay setting in the fontFamilies added to the theme.
   json created using the plugin. At this moment if you want to change that you 
   would need to edit the theme.json file manually to set the value you want.2. 
   The preview controls for the variable axes of fonts are currently only available
   on the “Upload local fonts” section of the plugin. They are not available in 
   the other sections because in the other sections, you can display several font
   families at the same time and the variable axes preview controls should be specific
   for each font file. Both are enhancements that we could add in the future. Thanks
   for your question.Cheers.
 *  Thread Starter [Gyurmey](https://wordpress.org/support/users/gyurmey/)
 * (@gyurmey)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16818811)
 * [@mmaattiiaass](https://wordpress.org/support/users/mmaattiiaass/), thanks for
   the answers. And is there a chance that the variable fonts after uploading to
   the server at least have a preview?
 *  Plugin Author [Matias Benedetto](https://wordpress.org/support/users/mmaattiiaass/)
 * (@mmaattiiaass)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16818839)
 * [@gyurmey](https://wordpress.org/support/users/gyurmey/), not sure if I understood
   your last question. Variable fonts have preview controls as any other font family
   but those controls are only the basic ones (font size and demo text). Variable
   axes preview controls are only available in the upload local font screen.
 *  Thread Starter [Gyurmey](https://wordpress.org/support/users/gyurmey/)
 * (@gyurmey)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16820643)
 * [@mmaattiiaass](https://wordpress.org/support/users/mmaattiiaass/), what I mean
   is that variable fonts, once uploaded to the server, have no preview.
 * **Before:**
 * ![](https://i0.wp.com/i.imgur.com/TloO9Bt.png?ssl=1)
 * **After:**
 * ![](https://i0.wp.com/i.imgur.com/h98u3S1.png?ssl=1)
 * [And live example.](https://app.instawp.io/wordpress-auto-login?site=%242y%2410%24x9spVhiC2WS4c7LyEChrzOieqn0m6iKkiq7FrKtj%2FqKYYdCFeNJZK)
 *  Plugin Author [Matias Benedetto](https://wordpress.org/support/users/mmaattiiaass/)
 * (@mmaattiiaass)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16821554)
 * gotcha [@gyurmey](https://wordpress.org/support/users/gyurmey/) thanks for the
   link to debug. In this case the problem is that the font was uploaded with wrong
   filename and path (it contains a white space that should not be there). I submitted
   a fix for this: [https://github.com/WordPress/create-block-theme/pull/401](https://github.com/WordPress/create-block-theme/pull/401)
   
   It will be solved when the next version of CBT is launched.When is launched it
   you could remove the font family and re-upload it and the problem will be solved.
   If you want to solve it right now and you are able to edit the files of your 
   theme you could replace the font family asset path in theme.json file by replacing
   the last part of the asset path “…100 900.ttf” by “100-900.ttf” (a dash instead
   of the white space). Apart from that you should update the name of the font file
   in your assets folder in the same way.
 *  Thread Starter [Gyurmey](https://wordpress.org/support/users/gyurmey/)
 * (@gyurmey)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16822411)
 * [@mmaattiiaass](https://wordpress.org/support/users/mmaattiiaass/), the font 
   file loaded without any spaces, but now I see what the problem is (no spaces 
   between the font weight values). Thanks for the clarification.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Problem with local variable fonts’ is closed to new replies.

 * ![](https://ps.w.org/create-block-theme/assets/icon-256x256.png?rev=2777957)
 * [Create Block Theme](https://wordpress.org/plugins/create-block-theme/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/create-block-theme/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/create-block-theme/)
 * [Active Topics](https://wordpress.org/support/plugin/create-block-theme/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/create-block-theme/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/create-block-theme/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Gyurmey](https://wordpress.org/support/users/gyurmey/)
 * Last activity: [2 years, 12 months ago](https://wordpress.org/support/topic/problem-with-local-variable-fonts/#post-16822411)
 * Status: not resolved