Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • 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. Bug Reports
  3. embedding font does not work

embedding font does not work

Scheduled Pinned Locked Moved Bug Reports
12 Posts 8 Posters 2.8k Views
  • 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.
  • A Offline
    A Offline
    annexyz
    wrote on Sep 17, 2017, 6:29 PM last edited by annexyz Sep 18, 2017, 4:27 AM
    #1

    Re: [Webfonts](upload works but webfont doesn't work)
    @Armin-Unruh
    Hi I tried to embed a font that I bought. The .woff file does exist but no browser shows the font. When editing text formats or uploading webfonts it shows the font in the right way. But on the website it does not work.

    I have all the files from the typeface: .woff / .ttf /.svg ...
    Here is the font: http://www.dafont.com/ogonek.font

    Correction: On my computer with chrome it works. But on another computer opened with chrome it does not work.
    And it also does not work with opera, firefox, safari

    PS.: Is it possible to upload the font folder onto the server? and link it via @font-face in the css?

    It would be great if you could help me with that.
    link to my site: anneschreier.xyz

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mariusjopen
      Global Moderator
      wrote on Sep 18, 2017, 10:44 AM last edited by
      #2

      Hi annexyz!

      Can you send a link to your website?

      to you use https?

      If yes, you need to add this to your htaccess:

      <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
          Header set Access-Control-Allow-Origin "*"
        </FilesMatch>
      

      Let me know!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • A Offline
        A Offline
        annexyz
        wrote on Sep 18, 2017, 12:10 PM last edited by
        #3

        @mariusjopen Hi Marius, thank you for your reply :)! Here is my website link: anneschreier.xyz

        What is htaccess? Where can I fand the htaccess in laytheme? Or do I do that with google´s inspector tool?

        Thank you very much for your help!

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mariusjopen
          Global Moderator
          wrote on Sep 20, 2017, 6:34 PM last edited by
          #4

          Hi @annexyz

          your Console shows a lot of errors. Probably you have some justom javascript or code which causes trouble.

          But apart from that I think it is connected to your htaccess.
          You use a secure server HTTPS and not the normal one HTTP.
          There is a small bug in embedding the font on HTTPS servers.

          You need to add the code above int your htacces.

          You need to open the files on your FTP server.

          You can find the files in the main folder of your Wordpress installation.

          0_1505932321196_Bildschirmfoto 2017-09-20 um 20.31.52.png

          Place the code right under:

          # BEGIN WordPress
          <IfModule mod_rewrite.c>
          

          It is a bit tricky sometimes to open that files but I am sure you can manage.
          There are many ways when you google it.

          I hope it works well. And if you have questions – let me know!

          Best!

          Marius

          www.mariusjopen.world

          D 1 Reply Last reply Dec 8, 2017, 12:40 PM
          0
          • M mariusjopen
            Sep 20, 2017, 6:34 PM

            Hi @annexyz

            your Console shows a lot of errors. Probably you have some justom javascript or code which causes trouble.

            But apart from that I think it is connected to your htaccess.
            You use a secure server HTTPS and not the normal one HTTP.
            There is a small bug in embedding the font on HTTPS servers.

            You need to add the code above int your htacces.

            You need to open the files on your FTP server.

            You can find the files in the main folder of your Wordpress installation.

            0_1505932321196_Bildschirmfoto 2017-09-20 um 20.31.52.png

            Place the code right under:

            # BEGIN WordPress
            <IfModule mod_rewrite.c>
            

            It is a bit tricky sometimes to open that files but I am sure you can manage.
            There are many ways when you google it.

            I hope it works well. And if you have questions – let me know!

            Best!

            Marius

            D Offline
            D Offline
            drchae
            wrote on Dec 8, 2017, 12:40 PM last edited by
            #5

            @mariusjopen I had a similar problem. What was strange was one font was working and the other wasn't.

            Your suggestion fixed everything. Thank you!

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mariusjopen
              Global Moderator
              wrote on Dec 8, 2017, 12:49 PM last edited by
              #6

              Hi @drchae
              happy to hear. In the future we hope not to need that fix anymore.

              All the best!

              Marius

              www.mariusjopen.world

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gdk
                wrote on Apr 24, 2020, 10:58 AM last edited by
                #7

                @mariusjopen said in embedding font does not work:

                <FilesMatch ".(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
                Header set Access-Control-Allow-Origin "*"
                </FilesMatch>

                Hi Marius - I have the same problem with Chrome and did try your solution but it doesnt work for me. Any idea?

                https://gebhart.dk/wp-commerce

                it works fine with Safari, but not in Chrome.

                best, Daniel

                1 Reply Last reply
                0
                • arminunruhA Offline
                  arminunruhA Offline
                  arminunruh
                  Global Moderator
                  wrote on Apr 24, 2020, 3:43 PM last edited by
                  #8

                  @gdk
                  hmm you can always try to delete the font in lay options -> webfonts and set it again

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    thomasmaier
                    wrote on Nov 5, 2021, 3:14 PM last edited by
                    #9

                    I found that only TTF provides the best experience. I had several issues over several installations and it was usually solved by reconverting the file format to TTF, wether you got WOFF, WOFF2 or OTF (which would probably be the best but is not supported by LayTheme).

                    1 Reply Last reply
                    1
                    • RichardR Offline
                      RichardR Offline
                      Richard
                      Global Moderator
                      wrote on Nov 7, 2021, 10:18 PM last edited by
                      #10

                      Thank you for the post @thomasmaier will keep this in mind for future issues.


                      Best wishes ✨
                      Richard
                      1 Reply Last reply
                      0
                      • benjaminmugnierB Offline
                        benjaminmugnierB Offline
                        benjaminmugnier
                        wrote on Dec 7, 2021, 11:12 AM last edited by
                        #11

                        Hello! To me TTF works good to upload on WP and supported with laytheme, works good on Safari. But ttf fonts don't display on Firefox & Brave. I can't see my woff or woff2 in the media in WP, Laytheme seems don't support theses files. Give me update if you got same issues. Cheers.

                        1 Reply Last reply
                        0
                        • RichardR Offline
                          RichardR Offline
                          Richard
                          Global Moderator
                          wrote on Dec 7, 2021, 9:28 PM last edited by
                          #12

                          Dear Benjamin

                          @benjaminmugnier

                          "I can't see my woff or woff2 in the media in WP, Laytheme seems don't support theses files."

                          Lay Theme does support these files and is tested. You may be having trouble with a bug relating to HTTP or HTTPS. Does Marius Jopen's post above provide a solution?

                          Or Armin's test:

                          "You can always try to delete the font in lay options -> webfonts and set it again"


                          Talk soon & best wishes
                          Richard
                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          I also code custom websites or custom Lay features.
                          💿 Email me here: 💿
                          info@laytheme.com

                          Before you post:
                          1. When using a WordPress Cache plugin, disable it or clear your cache.
                          2. Update Lay Theme and all Lay Theme Addons
                          3. Disable all Plugins
                          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                          This often solves issues you might run into

                          When you post:
                          1. Post a link to where the problem is
                          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                          Online Users
                          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