Site logo

[Resolved] Stuck with fonts loading from Google

Home Forums Support [Resolved] Stuck with fonts loading from Google

Home Forums Support Stuck with fonts loading from Google

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2492593
    WebbPlatsen

    I’ve been loading fonts locally on a site for a number of reasons (GDPR being a big one), but at some point I must have fumbled the ball and now I’m ending up with content like this:

    <link rel='stylesheet' id='generate-google-fonts-css' href='https://fonts.googleapis.com/css?family=Kreon%3A300%2Cregular%2C500%2C600%2C700&display=auto&ver=3.2.4' media='all' />

    What’s odd is that yes, I am using Kreon, but I am sourcing it locally in the additional CSS (see down below), and nowhere have I added fonts where the Google font manager (or whatever that toggle is called) is used.

    Is there a way to “reset” this so that GP stops loading the font(s) from Google?

    Here’s the additional CSS:

    pre {
    	background: rgba(0, 0, 0, 0.05);
    	font-family: "Lucida Console", Monaco, "Courier new", monospace;
    	font-size: 85%;
    	line-height: 1.4em;
    	margin-bottom: 1.5em;
    	padding: 10px;
    	overflow: auto;
    	max-width: 100%;
    }
    
    blockquote {
    	font-family:"Noto Sans", Helvetica, Arial, sans-serif;
    	background: rgba(0, 0, 80, 0.10);
    	font-size: 98%;
    	line-height: 1.8em;
    	margin-left: 1.5em;
    	margin-right:2em;
    	padding: 20px;
    }
    
    /* For our columns */
    .generate-columns .inside-article,
    .entry-summary {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    .read-more-container {
        margin-top: auto;
    }
    .generate-columns-container .featured-column {
        float: none;
        width: 100%;
    }
    
    /* noto-sans-regular - latin */
    @font-face {
      font-family: 'Noto Sans';
      font-style: normal;
      font-weight: 400;
      src: local(''),
           url('/local/fonts/noto-sans-v21-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/noto-sans-v21-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* noto-sans-italic - latin */
    @font-face {
      font-family: 'Noto Sans';
      font-style: italic;
      font-weight: 400;
      src: local(''),
           url('/local/fonts/noto-sans-v21-latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/noto-sans-v21-latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* noto-sans-700 - latin */
    @font-face {
      font-family: 'Noto Sans';
      font-style: normal;
      font-weight: 700;
      src: local(''),
           url('/local/fonts/noto-sans-v21-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/noto-sans-v21-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* kreon-300 - latin */
    @font-face {
      font-family: 'Kreon';
      font-style: normal;
      font-weight: 300;
      src: local(''),
           url('/local/fonts/kreon-v27-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/kreon-v27-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* kreon-regular - latin */
    @font-face {
      font-family: 'Kreon';
      font-style: normal;
      font-weight: 400;
      src: local(''),
           url('/local/fonts/kreon-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/kreon-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* kreon-500 - latin */
    @font-face {
      font-family: 'Kreon';
      font-style: normal;
      font-weight: 500;
      src: local(''),
           url('/local/fonts/kreon-v27-latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/kreon-v27-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* kreon-600 - latin */
    @font-face {
      font-family: 'Kreon';
      font-style: normal;
      font-weight: 600;
      src: local(''),
           url('/local/fonts/kreon-v27-latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/kreon-v27-latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* kreon-700 - latin */
    @font-face {
      font-family: 'Kreon';
      font-style: normal;
      font-weight: 700;
      src: local(''),
           url('/local/fonts/kreon-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
           url('/local/fonts/kreon-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
    }
    
    /* GeneratePress Site CSS */ /* Volume Remastered CSS */
    
    /* Featured post in blog */
    .featured-column.grid-100 {
    	width: 100%;
    }
    
    .featured-column.grid-100:not(.has-post-thumbnail) .gb-grid-wrapper > .gb-grid-column:first-child {
    	display: none;
    }
    
    /* Custom Post Navigation remove empty classes */
    .featured-navigation .gb-grid-column:empty {
        flex: 0 1;
    }
    
    @media(min-width: 769px) {
        .featured-navigation .gb-grid-column:not(:empty) {
            flex: 1 0;
        }
    }
    
    /* Single Post Hero image responsive controls */
    @media(max-width: 1024px) and (min-width: 769px) {
        .page-hero-block:before {
            background-size: cover;
        }
        .featured-column,
        .featured-column img.wp-post-image {
            width: 100% !important;
        }
    }
    
    @media(max-width: 768px) {
        .page-hero-block:before {
            background: none;
        }
    }
    
    /* Post Archives - force post meta to vertically align bottom */
    .generate-columns-container .post>.gb-container,
    .generate-columns-container .post>.gb-container>.gb-inside-container,
    .post-summary>.gb-inside-container {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .post-summary {
        flex: 1;
    }
    
    .post-summary>.gb-inside-container>*:last-child {
        margin-top: auto;
    }
    /* Add border radius to post archive images */
    .generate-columns-container .dynamic-featured-image {
        border-radius: 4px;
    } /* End GeneratePress Site CSS */
    #2492596
    WebbPlatsen

    What’s also interesting, is that if I remove “Kreon” from the “added fonts” (in the UI), and then try to re-add it, the “Use Google Fonts” toggle is enabled automatically (it’s not visible until you enter som text). I’m assuming this is because it actually finds it as an available font at Google. But I’d much rather this had to be done manually.

    #2492824
    David
    Staff
    Customer Support

    Hi there,

    so if you uncheck the Use Google Fonts API and save the changes, what happens if you exit the customizer and then return ?

    #2493094
    WebbPlatsen

    Yes, it seems like basically removing Kreon, publishing, exiting, coming back, adding it again, making sure the auto-enabled Use Google Fonts is disable, then setting up the typography again made it “go away”.

    That’s a long way to do it, but I guess it worked 🙂

    #2493998
    David
    Staff
    Customer Support

    That silly customizer can sometimes do some weird things 🙂

    Glad to hear you got it working.

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