We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35176
    • 193 Posts
    For example, I want multiple modx installs to share the same fontface files...
      jealousy<>love
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use an absolute path to the files when linking to them. Depending on your server configuration, you may not have permissions to access files above the web root.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 35176
        • 193 Posts
        with my domain as root, or.... wait, um.... the modx folder is my domain root, so... er...
          jealousy<>love
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          From what I’ve been able to find out, the font file must be in the web root in order for the @import in the .css file to work since it’s requesting the font file from the browser and the web server has to fetch it and respond with it the same as it does with any other URL request.

          It’s not the same as including an external file with PHP, where a file path is used since that’s done on the server, no web server involved.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 35176
            • 193 Posts
            could i do it with a symlink?
              jealousy<>love
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You can always try. You’re (probably) not going to break anything cool
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 35176
                • 193 Posts
                (not wanting to risk breakage)

                My webhost has a folder called www which is a shortcut to a folder called public_HTML.

                Could I do that?

                How?
                  jealousy<>love
                  • 35176
                  • 193 Posts
                  found a solution, i

                  • put the css for the fontfaces into its own .css file,
                  • then put that font.css file, along with all the fonts, into a shared folder ABOVE the modx folder,
                  • then link to that css file from my modx html head section, using full url.
                    jealousy<>love