Support » Plugin: OMGF | Host Google Fonts Locally » Automatic Font Detection?

  • Resolved Tiger

    (@jdstiger)


    Can you possibly add automatic font detection? I tried using this plugin but it doubles my page size because I don’t know which exact fonts to use. I am currently using a plugin that does that: https://wordpress.org/plugins/selfhost-google-fonts/ but it does not have features like this plugin such as font display swap which I need.

    Thanks.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Hi @jdstiger,

    In version 2.1.0 I added an auto-detect feature. It’s experimental, but it might help you 🙂

    Please provide me with any feedback you might have!

    Hi Daan,
    Thank You for Your great plugin!

    Testing the new autodetection feature with Twenty Sixteen in local test-environment:

    Used in Theme:
    Merriweather: latin => 400 (normal+italic), 700 (normal+italic), 900 (normal+italic)
    Montserrat: latin => 400 (normal), 700 (normal)

    Detected: Open Sans + Noto Serif
    (+ same result with other themes)

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Hi!

    Yeah, I noticed it myself this morning. 🙁

    The plugin is detecting the fonts used in the Administrator Area. So, to be sure: CONFIRMED BUG. I’m currently working on a fix for this.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Hi @burnuser and @jdstiger,

    Version 2.1.1 provides a much more stable approach to the Auto-Detect feature. Please give it a try and I hope it’ll help you out!

    It still detects Noto Serif + Open Sans, though, but it is de-selected by default. Since WordPress always includes these for some reason.

    Hope it works for your guys!

    Thread Starter Tiger

    (@jdstiger)

    @daanvandenbergh Thanks! It seems to work but when wanting to do the same for another page with different fonts it throws an error about search.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    You don’t have to repeat it for every page. So, you’re done 🙂

    Hi Daan!
    3 problems:

    1.) In Twenty Sixteen it found Merriweather (font of page content), but not Montserrat (font of site/page heading + menu)

    2.) It found not all loaded styles
    Check: Ctrl + Shift + I => Network => fonts.googleapis.com
    … in Twenty Sixteen, Merriweather 900 italic is missing

    3.) To make a second try if something seems wrong is very confusing.
    Maybe an explicit “Reset/Restart Auto detection” option would be helpful?

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Thanks for the report @burnuser.

    Since you’re describing a new issue, it’s best (next time) to open a new ticket for this.

    I’ll test with Twenty Sixteen! Thanks!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Found the problemen in Twenty Sixteen. Fix coming soon!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    @burnuser,

    v2.1.2 contains a fix for (themes like) Twenty Sixteen!

    Enjoy! 🙂

    OK, the detection works!

    Downloading fints … OK
    Generate Stylesheet … OK

    But after “Save Changes” the font Queue is always gone (= empty) and no local font is served (Only Remove Google Fonts works, if activated)

    Have tried with two different WP environments (local + online), but the last working plugin version is 2.0.8

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Please clarify your message, in which step do you click ‘Save changes’? Because ‘Save changes’ is only necessary when changing settings within the right panel.

    After you’ve clicked ‘Generate Stylesheet’, the downloaded fonts should be served in your frontend, regardless of whether the queue is empty or not.

    Could you provide me with the steps to reproduce your issue?

    I have tested it in the described order many times before complaining.

    Now I have tested it once again (nothing changed) … and it works as it should.

    Sorry, but I have no explanation for what went wrong on my side. Must be something in my Webbrowser (?)

    Your plugin works!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    @burnuser,

    Really? Wow. 🙂

    Well, thanks anyway for reporting back! I’m currently implementing a few more improvements to the process.

    It might’ve been some cached Javascript or something?

    Anyway, have a pleasant day!

    Thread Starter Tiger

    (@jdstiger)

    @daanvandenbergh not for me other pages use Roboto, my theme’s default font is Lato so It only detects Lato unless I open a page with Roboto, could it be because I’m using elementor to add Roboto?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Automatic Font Detection?’ is closed to new replies.