Error uploading SVG Font File


(Bobby) #1

I am trying to upload an SVG font file on my Discourse powered community but I keep getting this error:

Sorry, but we couldn’t determine the size of the image. Maybe your image is corrupted?

I feel the svg font file is being read as an image. Possibly a bug ?


(Jeff Atwood) #2

In what context is svg font used? Why not use another standard expected font format like woff2?


(Bobby) #3

I had issues where chrome for Android was not working with woff2 and ttf fonts but with .svg fonts, it worked perfectly. I’ve fixed this issue by uploading directly to Amazon s3 but you might want to look into svg fonts for future purposes.


(Jeff Atwood) #4

Discourse only sends down the woff2 version of Font Awesome which is fairly aggressive, also required for the site to look normal with glyphs, and we have had zero complaints.


(Mittineague) #5

No Opera-mini users? :wink:

I must say, If caniuse is correct, WOFF - Web Open Font Format has broad browser support.

But unfortunately SVG fonts looks to be supported by Safari only

Seeing as Safari supports WOFF is there any real motivation to use SVG font anyway?


(Eli the Bearded) #6

I think I have that on my phone. Given that it proxies everything (or just https?) through Opera servers, I trust it somewhat less than I can throw my phone.