[Resolved] Local fonts not visible in customizer

Home Forums Support [Resolved] Local fonts not visible in customizer

Home Forums Support Local fonts not visible in customizer

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #2025907
    manaadiar

    Hi there.. I followed https://docs.generatepress.com/article/adding-local-fonts/ to add Rajdhani local font.. But it is not showing in the customizer.. I also used below code to remove Google Fonts, but it is still showing in the customizer..

    //removing google fonts
    add_action( ‘admin_init’, function() {
    add_filter( ‘generate_google_fonts_array’, ‘__return_empty_array’ );
    } );

    add_action( ‘wp_enqueue_scripts’, function() {
    wp_dequeue_style( ‘generate-fonts’ );
    } );

    When I type “Rajdhani” font-family as mentioned in other support topics, it still doesn’t show up.. I have cleared cache from page, from WP, from my host.. Still nothing.. Pls let me know..

    site is https://shippingandfreightresource.com

    #2026010
    David
    Staff
    Customer Support

    Hi there,

    in the new typography settings, you DO NOT require that snippet.
    Simply enter the name of your local font in the Font Manager > Font Family Name field

    #2026477
    manaadiar

    Rajdhani is a Google Font which I uploaded into my WP as per the article so it should show under System Font.. But it is not.. It is still showing under Google Font, hence I put the snippet to get rid of the Google Fonts.. The problem is that even after installing, Rajdhani is not showing up under system font.. Hence my post..

    #2026680
    Ying
    Staff
    Customer Support

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

    In the above article, it says if the local font is a google font, adding the font without toggling on the Google Font option.

    Can you give that a try see if it works normally?

    #2028789
    manaadiar

    Hi Ying, yes Rajdhani is a google font which has been added locally as per the document.. But I don’t understand what you mean by “adding the font without toggling on the Google Font option.”.. Where is the toggle option..?? In the customizer there is option to either choose a local font or choose a google font..

    The problem that I have is that the local font I added using the method in the article is not showing in the list of local fonts.. Can you assist pls..

    #2028890
    David
    Staff
    Customer Support

    Watch the following:

    #2028907
    manaadiar

    Hi David, not sure where this is..?? My customize option is shown in the screenshot..

    toggle

    I have version 2.1.1 of GP Premium, which is the latest version as per your website.. Is this not the right version..??

    #2028935
    David
    Staff
    Customer Support

    Make sure you have the latest theme GP 3.1 and GPP Premium 2.1 installed. Then in Customizer > General you can enable the new typography settings.

    #2029018
    manaadiar

    Hi David

    1) I have GP3.1 which I activated and still no Google Toggle option (see screenshot below)
    2) I am running GP Child Theme – and here also no Google Toggle Option
    3) I already have GP Premium 2.1 installed

    What next..??

    GP toggle

    #2029726
    David
    Staff
    Customer Support

    in Customizer > General you can enable the new typography settings.

    #2029844
    manaadiar

    Ok the toggle is there now, but the problem still is there.. If you look at the link below, you can see that the Rajdhani font is not part of the local fonts..

    Fonts

    If I type the font-family name, it still doesn’t activate.. The font files are in my database as below and also added in CSS

    /* rajdhani-regular – latin */
    @font-face {
    font-family: ‘Rajdhani’;
    font-style: normal;
    font-weight: 400;
    src: url(‘https://www.shippingandfreightresource.com/wp-content/uploads/rajdhani-v10-latin-regular.eot’); /* IE9 Compat Modes */
    src: local(”),
    url(‘https://www.shippingandfreightresource.com/wp-content/uploads/rajdhani-v10-latin-regular.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
    url(‘https://www.shippingandfreightresource.com/wp-content/uploads/rajdhani-v10-latin-regular.woff2’) format(‘woff2’), /* Super Modern Browsers */
    url(‘https://www.shippingandfreightresource.com/wp-content/uploads/rajdhani-v10-latin-regular.woff’) format(‘woff’), /* Modern Browsers */
    url(‘https://www.shippingandfreightresource.com/wp-content/uploads/rajdhani-v10-latin-regular.ttf’) format(‘truetype’), /* Safari, Android, iOS */
    url(‘https://www.shippingandfreightresource.com/wp-content/uploads/rajdhani-v10-latin-regular.svg#Rajdhani’) format(‘svg’); /* Legacy iOS */
    }

    When I put the links on a browser, all show as working except the .ttf file which is not accepted by WP even though I have added the function in function.php to allow upload..

    Let me know what can be done.. Thanks..

    #2029929
    Ying
    Staff
    Customer Support

    It won’t show in that list even it’s installed locally.

    So can you try to add the font in like shown in the below video?
    https://www.screencast.com/t/1B0qiEPNJI

    So we can see if it’s working locally.

    #2029952
    manaadiar

    Hi Ying, although the local font Rajdhani looks slightly different to that of Google Fonts Rajdhani (although its the same one I downloaded), it seems to have worked now.. Thank you.. Will close this topic..

    #2030034
    Ying
    Staff
    Customer Support

    You are welcome 🙂

    #2406867
    Alan

    I too am trying to solve this “Google font” toggle not appearing despite running the latest GP and GP Premium plugins.

    I tried to watch Ying’s video above which seemed to have helped Manaadiar but it doesn’t load, any advice on what that link showed originally? (https://www.screencast.com/t/1B0qiEPNJI)

    Also, David, “in Customizer > General you can enable the new typography settings.” I see no option to enable the new typography setting. See screenshot.

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