Has anyone here sussessfully hosted and served Google’s Material Symbols Fonts using Django? How did you do it?
I get a box (something signifying a missing character).
It works well with the older (now deprecated) Material Icons. Material Symbols are VariableType fonts. I wonder whether the issue is with the architecture (fonts) or something I am missing. Django outputs the following when rendering any element that uses the font:
I followed Google’s guide here. The fonts were declared using @font-face as specified there. Like I said earlier, django GETs the fonts. They just don’t render on the browsers.
I had obtained the woff2 and ttf files from Source. Those files appear to be truncated. Font Viewers choke on them. I just recently found out that Google provides a direct download link to the fonts. However, the resulting archive includes truetype fonts only.
Guess what? Those files are larger … running into megabytes, whereas the previous ones were in kilos. I have applied the latest files. Everything works!
In the long run, this had nothing to do with Django. I thought I might be doing something wrong within Django. I was wrong. Now the next real challenge is bundling Material Symbols with my Django module (at PyPi). The module requires Material Symbols and the file sizes just went up significantly. Is it possible that current Material Symbol Fonts are maintained in a pip repo? That would make sense.