wordpress 6 theme.json custom fonts are not working
-
i follow the twenty twenty two theme, and added to my custom theme: i have in my assets/fonts folder, my woff2 font. and in my theme.json inside the setiings -> typography ->fontFamilies like so:
"fontFamilies": [ { "fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif", "slug": "system-font", "name": "System Font" }, { "fontFamily": "Helvetica Neue, Helvetica, Arial, sans-serif", "slug": "helvetica-arial" }, { "fontFamily": "Geneva, Tahoma, Verdana, sans-serif", "slug": "geneva-verdana" }, { "fontFamily": "Cambria, Georgia, serif", "slug": "cambria-georgia" }, { "fontFamily": "Hoefler Text, Baskerville Old Face, Garamond, Times New Roman, serif", "slug": "hoefler-times-new-roman" }, { "fontFamily": "Rubik, Verdana, sans-serif", "slug": "rubik-verdana" }, { "fontFamily": "Rubik-Italic, Verdana, sans-serif", "slug": "rubik-italic-verdana" }, { "fontFamily": "\"Rubik Glitch\", cursive", "name": "Rubik Glitch", "slug": "rubik-glitch", "fontFace": [ { "fontFamily": "Rubik Glitch, cursive", "src": ["file:./assets/fonts/Rubik_Glitch/RubikGlitch-Regular.woff2"] } ] } ]
but it doesn’t work. when i go to the global styles and change the site fonts, nothing is changing.
what am i doing wrong?
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘wordpress 6 theme.json custom fonts are not working’ is closed to new replies.