Feature requests

Add Variable Font Support to Custom Fonts

1mo agoPending

Hello WoodMart Team,

I would like to request native support for variable fonts in the Custom Fonts settings.

Currently, WoodMart generates the @font-face CSS rules for custom fonts in the get_custom_fonts_css() method of Themesettingscss. The generated font-weight declaration is based on the configured font weight, with normal used as a fallback when no weight is specified. However, there is no dedicated option to declare a variable font's weight range.

For example, when using a variable font that supports weights from 100 to 900, the generated CSS should include:
font-weight: 100 900;

This range is important because it allows the browser to recognize the font's supported weight axis and render intermediate weights correctly, rather than treating the font as a single static weight.

Currently, I have to modify the theme's PHP file manually after every WoodMart update. Specifically, I edit the code around line 316 in Themesettingscss, within get_custom_fonts_css(), to make the generated @font-face rule output font-weight: 100 900;. Since this is a modification to a theme file, every update overwrites my change, forcing me to repeat the same manual edit.

Could you please add a dedicated Variable Font option to the Custom Fonts settings? When enabled, WoodMart should generate the appropriate font-weight range in the @font-face declaration. Ideally, the minimum and maximum weights should be configurable, with 100–900 as a common example, rather than hardcoded for every variable font.

Existing behavior for static fonts should remain unchanged, and the generated CSS should continue to work with the existing custom font options and theme settings.

As variable fonts are a well-established web font format in 2026, native support would eliminate the need for users to modify core theme files and would make custom font management more reliable across updates.

Thank you for considering this improvement.

and 1 other

4 comments

  1. Amirhosein28d ago

    Hi Mohammad Reza,

    You can actually define variable fonts right now without needing to modify the theme files.

    All you have to do is go to the theme's Custom Fonts section, select a different weight each time, but assign the exact same variable font file to all of them.

    So, you will essentially have 9 custom fonts set up in the Custom Fonts section, ranging from weight 100 to 900, but they all share just 1 file.

    This way, it doesn't matter which font weight you use, because only a single file (the variable font file) is loaded on the page.

    1. 9 font face rules :|

    2. Amirhosein28d ago

      This is just a workaround. It doesn't really make the page heavy, but it's definitely not standard either. If WoodMart adds the feature, that'd be great, but if they don't, you can just use this trick.

    3. من خیلی بلد نیستم. آیا 9 تا فونت فیس باعث 9 تا ریکوئست / 9 بار دانلود شدن فونت برای بازدید کننده اول نمیشه ؟