• Resolved Raul Craveiro

    (@craveiroraul)


    Is there a way to add a custom font to the Poe theme? I wanted to use the Albert Sans font on Poe, but I don’t know if this is possible on a block theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @craveiroraul,

    You currently can’t add fonts directly in the Site Editor, but you can load a Google Fonts fonts through a plugin, create a child theme, and add it as a font family in the theme.json file in the child theme.

    Create a child theme the regular way, and add a theme.json file to the child theme folder with the following:

    {
    	"$schema": "https://schemas.wp.org/trunk/theme.json",
    	"version": 2,
    	"settings": {
    		"typography": {
    			"fontFamilies": [
    				{
    					"fontFamily": "\"Albert Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", sans-serif",
    					"slug": "default",
    					"name": "Albert Sans"
    				}
    			]
    		}
    	}
    }

    — Anders

    Thread Starter Raul Craveiro

    (@craveiroraul)

    Thank you so much for the help!

    I didn’t know if it was possible to create a child theme for block themes, but I’m glad it’s possible!

    Keep up with the amazing work! ??

    Carl

    (@carlbtmn)

    Is there a way to do this with a custom font? I already have the otf file in the directory.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add a custom font’ is closed to new replies.