Materialize: Missing Font Files Error | Lack of documentation on changing path of fonts

Created on 17 Nov 2016  路  4Comments  路  Source: Dogfalo/materialize

Description

File missing error shown up even after changing all font file locations in materialize.css. Am I missing something?

Repro Steps

File locations are different from default. Say my css files are in '/rcss/', js in '/rjs/' and fonts are in '/assets/rfonts/'. But error denotes something still refers older locations of font files. Where should I change?

Changes all locations in materialize.css only. Couldn't find any other file which calls font files.

Screenshot

capture

Most helpful comment

Oh OK. It was Cloudflare CDN who caches CSS caused the issue. My bad. Replacing all 25 locations in materialize.css enables changing font directory. If there is any possibility to modify it into a single path and reusing the same, customization will be lot easier, just saying. Anyway thanks for the support @kmmbvnr.

All 4 comments

Probably you miss some location in materialize.css, or CSS file is cached.

You can try to open http://.../rcss/materialize.css and check the content returned by webserver

Cleared cache and all occurrences of '/font/' replaced with '/assets/rfonts/' already and I can see the change while viewing source in the browser. There were 25 occurrences of of '/font/' in 'materialize.css' by the way. Still the problem persists as in the screenshot. Is there something to do with 'materialize.js'? This is one thing not documented well and I think how to change font file location should be included in getting started/typography.

There is no /font/ in the materialize css. It uses /fonts/ directory

search results

Maybe you have another one materialize.css in your code with unchanged variables. You can try to save "web-page complete" from chrome and search over the files for /fonts/ text

MaterializeCSS customization is documented on Getting Started page - http://materializecss.com/getting-started.html

You can build it from SASS and change the $roboto-font-path if you like. But it leads exactly to the same result as manual .css modification.

Oh OK. It was Cloudflare CDN who caches CSS caused the issue. My bad. Replacing all 25 locations in materialize.css enables changing font directory. If there is any possibility to modify it into a single path and reusing the same, customization will be lot easier, just saying. Anyway thanks for the support @kmmbvnr.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

serkandurusoy picture serkandurusoy  路  3Comments

samybob1 picture samybob1  路  3Comments

acierpinski picture acierpinski  路  3Comments

alexknipfer picture alexknipfer  路  3Comments

PhillippOhlandt picture PhillippOhlandt  路  3Comments