• Resolved Anonymous User 17807427

    (@anonymized-17807427)


    I’ve spent hours looking at Github and whatever few outdated tutorials are out there online.

    How do you add custom fonts?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Anonymous User 17807427

    (@anonymized-17807427)

    Better yet, how do you delete google fonts altogether? How do you make it so Google fonts doesn’t get loaded with the site?

    Other topics were opened regarding this but no answer.

    Seems like such a basic feature to me to have the option to turn off Google fonts in order to use custom fonts with CSS.

    Remove Google fonts plugin doesn’t work either.

    You can add the choices parameter to the typography field like this for instance:

    'choices' => [
    	'fonts' => [
    		'google'   => [],
    		'standard' => [
    			'Georgia,Times,"Times New Roman",serif',
    			'Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif',
    		],
    	],
    ],

    For the google parameter, simply pass an empty array. This will prevent any Google Fonts from showing up. In addition you can pass your own fonts with the standard parameter, though this won’t actually “enqueue” and load these fonts for the visitor. Those should mainly be used for system fonts.

    Here is a detailed tutorial on how to include custom fonts – https://wp-pagebuilderframework.com/docs/custom-fonts/

    Best,
    David

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

The topic ‘How to add custom fonts’ is closed to new replies.