Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Resolved] Local Font Issue

Home Forums Support [Resolved] Local Font Issue

Home Forums Support Local Font Issue

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1378714
    Math

    Hi,

    I uploaded a local font to the ‘fonts’ directory within the child theme, but I can’t seem to call it. Can you please take a look to see what I’m doing wrong?

    @font-face {
      font-family: 'Jakarta Display';
      src: url('fonts/PlusJakartaDisplay-Bold.woff2') format('woff2'), 
           url('fonts/PlusJakartaDisplay-Bold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    }
    h1 {
      font-family: 'Jakarta Display';
    }
    #1378904
    David
    Staff
    Customer Support

    Hi there,

    try adding the full URL path in your @font-face URLS.

    #1379150
    Math

    I put in the full link and still the same issue. Also, I have another issue… I’m using Inter UI font for the body, and it seems to be working fine for Chrome but Firefox won’t read it.

    @font-face {
      font-family: 'Jakarta Display';
      src: url('https://tomm.co/wp-content/themes/generatepress_child/fonts/PlusJakartaDisplay-Bold.woff2') format('woff2'), 
           url('https://tomm.co/wp-content/themes/generatepress_child/fonts/PlusJakartaDisplay-Bold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    }
    #1379228
    David
    Staff
    Customer Support

    Can you temporarily place that CSS in the Customizer > Additional CSS

    #1379367
    Math

    That seems to have fixed it. Is there a reason I can’t use the child theme css instead?

    When I tried copying everything from the customizer back to the child theme style.css, it stopped working again.

    #1379397
    David
    Staff
    Customer Support

    Remove this from your stylesheet:

    @import url('../generatepress/style.css');

    It isn’t necessary and is breaking your child styles

    #1379438
    Math

    Thank you! That fixed it.

    #1379586
    David
    Staff
    Customer Support

    Glad to hear that

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