• GWKaplan

    (@gwkaplan)


    Hello! I’m trying to use a local custom font through a child theme. In this case is Rubik font. I uploaded it through FTP and changed the theme.json file with this code:

    "fontFace": [
    {
    "fontFamily": "Rubik",
    "fontStretch": "",
    "fontStyle": "normal",
    "fontWeight": "300 400 500 600 700 800 900",
    "src": [
    "file:./assets/fonts/Rubik-VariableFont_wght.woff",
    "file:./assets/fonts/Rubik-VariableFont_wght.woff2",
    "file:./assets/fonts/Rubik-VariableFont_wght.ttf"
    ]
    }
    ],
    "fontFamily": "\"Rubik\", sans-serif",
    "name": "Rubik",
    "slug": "rubik"
    }

    I’ve used Spectra One with child theme many times and I’ve always had some problems customizing theme options changing theme.json file in the child theme. But this is the first time that, after uploading font and customizing theme.json file, I can’t use Rubik font on the theme editor styles options. It continues to show only Inter. And the font changes in the frontend because of body style in my custom css.

    So, is there any change I’m missing? Also I can see that all custom css properties (e.g., –preset-color–light) are declared out of theme.json, so I’m not sure that theres any point on customizing theme.json file to change theme editor options for the theme?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter GWKaplan

    (@gwkaplan)

    Actually the problem is not custom fonts. Not only, at least. Nothing I customize in the chold theme theme.json is overrriding the parents theme settings!

    mohsinbsf

    (@mohsinbsf)

    Hi @gwkaplan,

    Sorry for the inconvenience caused to you.

    I am not able to replicate the issue on my installation. I request you open a support ticket from here:https://wpspectra.com/support/ so that our support dev can help better.

    Have a nice day!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use custom local fonts through child theme’ is closed to new replies.