Prevent FOUT from happening

Home Forums Use Any Fonts Prevent FOUT from happening

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #333897
    Dee
    Guest

    Hi there,

    Unfortunately when loading the page, now and then a different font is shown for a second, and then that font is very quickly replaced by the font I really want to show and have uploaded in the plugin.

    I’ve not assigned the font to any element tag, because I only use the font now and then, on single words, like for example:

    My text<span style=”font-family: my-custom-font, script; font-size: 46px; color: #304771;”>my-single-word-in-script</span> my text.

    How can I prevent FOUT from happening?

    I also have addd this code to the css, but it didn’t help:

    @font-face {
    font-family: ‘my-custom-font-name’;
    src: url(‘https://mydomain/wp-content/uploads/useanyfont/12345678Font-Name.woff’) format(‘woff’),
    url(‘https://mydomain/wp-content/uploads/useanyfont/12345678Font-Name.eot’) format(‘eot’);
    font-weight: 200;
    }

    It would be nice if you had an tutorial about this.

    Hope to hear from you soon,
    Thanks in advance!

    (I have a Pro account.)

Viewing 1 post (of 1 total)
  • The topic ‘Prevent FOUT from happening’ is closed to new replies.