I'm attempting to make a game for WebGL. However, everytime I export a build, the font always changes on everything, just like below.

Original enter image description here

WebGL enter image description here

My default font is Arial and I have made a separate Arial font file with which I've replaced all instances of Arial font in my game, but it's still turning out like this. Why?


I just managed to solve the problem in a very weird way.

I initially brought an Arial font file into the project and replaced all text object fonts with this. It didn't work. To make sure it was accessing that font file and not the default font, I renamed it "_Arial". Still didn't work.

Then while looking at the Unity Documentation, I noticed this:

Font Names: A list of fallback fonts to use when fonts or characters are not available (see below).

So I got an idea. I duplicated my _Arial Font, which was my original Arial font, and renamed it back to simply "Arial". Built my project and it worked. I don't have a solid reason why it works, but I highly suspect it's because it can't ever find a "_Arial" font, so it uses the Font Names section as a fallback, which in this case is "Arial". If there's a separate font with that name, Arial, it just runs to that instead since it's already listed on _Arial's Font name reference. As to why this didn't work normally when I tried to just run the regular "Arial" font file, I have no idea, but that seems to be how it works from what I can tell and it solved the issue. This seems exclusive to Arial though. Other fonts work just fine.

Hopefully anyone with this problem can see this and try that solution, as nonsensical as it is.

  • \$\begingroup\$ I had the same problem. While I didn't try your method, but anyone stumbling upon this question, I managed to solve it by changing the Font Style of all my text components. \$\endgroup\$ – Aditya Yadav Jun 27 '18 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.