Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Feedback
  3. font-display: swap

font-display: swap

Scheduled Pinned Locked Moved Feedback
4 Posts 3 Posters 453 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    I
    iamerwin
    wrote on last edited by
    #1

    I added

    font-display: swap
    

    to line 132 of the fontmanager.php file so I get a little more love from the Lighthouse optimize scan thingie. :)

    $newfontsCSS .= '@font-face{ font-family: "'.FontManager::$customFonts[$i]['fontname'].'"; src: url("'.$url.'") format("'.$fileformat.'"); font-display: swap; } ';
    

    Maybe something to put in the source code permanently?

    1 Reply Last reply
    0
    • RichardR
      RichardR
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear @iamerwin

      Cool!
      Will forward this to the top,
      Have a wonderful day & best wishes :)

      Richard

      1 Reply Last reply
      0
      • RichardR
        RichardR
        Richard
        Global Moderator
        wrote on last edited by
        #3

        Dear @iamerwin

        An Update:
        Armin is delayed currently, sorry that he hasn't responded yet, A follow up on your issue will come as soon as possible.

        Once again sorry for the inconvenience & if i can help further let me know :)

        Best wishes
        Richard

        1 Reply Last reply
        0
        • arminunruhA
          arminunruhA
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          "Instructs the browser to use the fallback font to display the text until the custom font has fully downloaded. This is also known as a “flash of unstyled text” or FOUT."

          not sure if i want a flash of unstyled text

          i believe you can just use this custom css in lay options -> custom html&css:
          body{
          font-display: swap;
          }

          that should work and this way your change in the php file wont be overwritten when you update lay theme next time

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          Online Users
          I
          itsbadjujuju
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search