SOLVED: Custom Fonts loads Woff only

Bricks Version: 1.3.7
Browser: Firefox Nightly / Chrome Beta
OS: macOS / Windows / Linux / etc.
URL: (https;//techelex.com/)

Hi, I upload two fonts via bricks custom fonts, woff, woff2, and ttf. But it’s loads woff only on every browser, I delete CSS files manually from my host directory the regenerate them. Also tried to upload woff2 first but this problem still exists.

font-googlechrome

Hi Shaik,
Welcome to the forum!

The order of the fonts inside the src attribute is crucial. If the browser can load the first file inside the src attribute (woff), the other formats doesn’t matter.

Of course, woff2 is the “better” format due to its larger compression / lower file size, so we could theoretically set it on the first position. The browser support is the same as of now. So there is nothing against it from my point of view.

The reason why the woff2 files aren’t showing for you, even if you removed the woff files from your custom fonts list, is probably caching. Please regenerate your styles and clear your browser cache. Then it should definitely work.

Best regards,
timmse

I delete the css files manually from server directory, clear the cache. Still woff loaded first.
Then, i re-upload the woff2 first then woff then ttf, delete the css directly from server, regenerate css minified files and check. It’s still woff.
You are right about order of fonts, if you see this css url you’ll find bricks prints woff files before woff2 no matter in which order you upload.
But if you check icoicons it’s loads woff2 bydefault and in css it’s prints before woff.
Check icoicons css

I didn’t remove the woff, i removed entire fonts files and upload woff2, woff, and ttf orders. In css files it’s prints woof, woff2 ,and ttf order.

Hi,

yes because the order is fixed and not dependent on the upload order :smiley: But if you leave the woff file empty and upload woff2 and probably ttf instead, the woff2 will be loaded (after regenerating the styles and clearing the browser cache).

I know this trick but wish it loads woff2 first no matter if we upload or remove woff files from sites.

As I said, there is basically nothing against it, since the browser support is now on the same level. Accordingly, we will change the order in the next version (that’s why the post title is WIP = work in progress) :slight_smile:

I don’t know about WIP full form. You can close this topic. Thanks for your time and detailed explanations.

Hey,
we’ve switched the loading order in Bricks 1.4: woff2 > woff > ttf :rocket:

Best regards,
timmse

1 Like