[Support request] Feature Request: Add IBM Plex Mono font to typography options

Home Forums Support [Support request] Feature Request: Add IBM Plex Mono font to typography options

Home Forums Support Feature Request: Add IBM Plex Mono font to typography options

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #588890
    Jordan

    Would be great if I could select the IBM Plex Mono font from the dropdown menu.

    If it’s a quickie to do…

    Cheers!

    #588896
    Leo
    Staff
    Customer Support
    #589529
    Jordan

    Very cool.

    It does not say where to paste the code, though?

    Cheers!

    #589536
    David
    Staff
    Customer Support

    Hi Jordan, you can add the PHP snippets to a child theme function file or simpler still use the Code Snippets plugin – more info:

    http://docs.generatepress.com/article/adding-php

    #589542
    Jordan

    Ah, so it is quite technical!

    I think the feature request remains for me then — to have a point and click access to all the fonts without installing more plugins or using child themes etc.

    Dreamer!

    Back to reality —

    I have installed the Code Snippets plugin (hate adding more plugins but still..)

    My next question is, does the code snippet need to run “everywhere,” “only in admin,” “front end” or “only once”?

    Thanks for the help!

    #589595
    David
    Staff
    Customer Support

    Front end will be fine. Or you can run everywhere.

    #589599
    Jordan

    Hmm, OK I now have a bunch more fonts to choose from, but looks like IBM fonts are not included in the full list.

    Argh!

    #589623
    David
    Staff
    Customer Support

    Hi Jordan, IBM fonts are not a part of Google fonts. You can add them as per any custom font, this topic will help:

    https://generatepress.com/forums/topic/using-font-squirrel-and-fontawesome-locally/

    And the font is available on font squirrel

    https://www.fontsquirrel.com/fonts/ibm-plex

    #589631
    Jordan
    #589635
    David
    Staff
    Customer Support

    Hi Jordan, my bad, i didn’t check the site just the list. Are you ok to add the font manually? Tom wrote this guide how to:

    https://docs.generatepress.com/article/adding-local-fonts/

    #589636
    Jordan

    Thanks David.

    I haven’t the energy to be honest.

    Maybe some other time!

    Appreciate your help, especially the rapid responses (impressive support — big thumbs up.)

    Cheers o/

    #589639
    David
    Staff
    Customer Support

    Hi Jordan, sorry to cause a bit of a run around. When you have the energy let us know. Have a good day.

    #592288
    Jordan

    OK, got this done finally.

    Installed Code Snippets.

    Here’s the code I used:

    add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
    function tu_add_google_fonts( $fonts ) {
    	$fonts[ 'ibm_plex_mono' ] = array( 
    		'name' => 'IBM Plex Mono',
    		'variants' => array( '400', '400i', '700', '700i' ),
    		'category' => 'monospace'
    	);
    	
    	return $fonts;
    }

    (I ticked the box, “Only run in administration area” and that worked fine.)

    After this, I could finally select the IBM Plex Mono font.

    Cheers!

    #592292
    David
    Staff
    Customer Support

    Glad to hear you got this resolved!

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.