• Resolved thewebtailors

    (@thewebtailors)


    I am trying to add custom fonts (part of Adobe Fonts enqueued with your https://wordpress.org/plugins/custom-typekit-fonts/ plugin) website to the Font Family selector in the typography options (e.g available in the Headline Spectra Gutenberg block).

    I am using the following code to add my Adobe Fonts (since they are not automatically added to Spectra) and it works. Except, I cannot find a way to define the fallback fonts as ‘value’ and ‘label’ are ignored. Spectra just used the array key as the font label and value.

    add_filter('spectra_system_fonts', function($fonts) {
        $fonts['Meno-Display-Condensed'] = (object) [
            'value' => "Meno-Display-Condensed",
            'label' => "Meno-Display-Condensed",
            'weight' => ["Default","100","200","300","400","500","600","700","800","900"],
            'google' => !1
            ];
    	$fonts['Adlery-Pro'] = (object) [
    		'value' => ["Adlery-Pro,adlery-pro,sans-serif"],
    		'label' => ["Adlery-Pro"],
    		'weight' => ["Default","100","200","300","400","500","600","700","800"],
    		'google' => !1
    	];
    
        $fonts['Tablet-Gothic-Condensed'] = (object) [
    		'value' => "Tablet-Gothic-Condensed,tablet-gothic-condensed,sans-serif",
    		'label' => "Tablet-Gothic-Condensed",
    		'weight' => ["Default","100","200","300","400","500","600","700","800","900"],
    		'google' => !1
    	];
      return $fonts;
    });

    How can I define the fallback font or what gets added to the font-family css attribute?
    Thank you for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @thewebtailors,

    Sorry for the inconvenience caused to you.

    I am currently checking with the team to address the issue. Kindly allow me some additional time to investigate and provide you with a comprehensive response. Your patience is highly appreciated, and I will make sure to keep you updated on the progress. Thank you for your understanding.

    Have a nice day!

    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @thewebtailors,

    Can you please explain what you are trying to achieve so that we can assist you with the proper solution?

    Looking forward to hearing from you.

    Have a nice day!

    Thread Starter thewebtailors

    (@thewebtailors)

    The website I need support with uses Adobe Fonts (instead of Google Fonts). I am trying to add the website’s Adobe Fonts (enqueued with your https://wordpress.org/plugins/custom-typekit-fonts/ plugin) to the Font Family selector in the typography options (e.g available in the Headline Spectra Gutenberg block).

    The selected Adobe Fonts show in the typography settings in the Customizer, but they don’t show in e.g. the typography settings for the Headline Spectra Gutenberg block. As a result, I cannot choose the enqueued Adobe Fonts for my Spectra Headlines.

    Let me know if you have any questions.

    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @thewebtailors,

    I am sorry for the inconvenience.

    We need to check the backend configuration. 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!

    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @thewebtailors,

    It’s been long since we heard from you. I am going ahead to mark this as resolved.

    Please feel free to open a new thread in case of any other queries.

    Have a nice day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add Custom Fonts’ is closed to new replies.