1

I am using visjs with angular to render a simple network, the icons are loaded properly locally.

enter image description here

But when hosted, actual unicode characters are rendered.

Fontawesome icons outside of canvas are loaded, but within the network this happens.

**enter image description here**

What could be causing this?

kintoki
  • 318
  • 2
  • 11
  • Is [this question](http://stackoverflow.com/questions/13761472/how-to-render-glyphs-from-fontawesome-on-a-canvas-element) related? – Mat J Nov 04 '16 at 04:11
  • I have no problem with rendering, I am not sure what is missing because it works locally but not when hosted. – kintoki Nov 04 '16 at 04:14

1 Answers1

1

After almost a week I found out the problem was default encoding used by Tomcat.

Make the following change in tomcat/conf/web.xml

<mime-mapping>
    <extension>js</extension>
    <mime-type>application/javascript</mime-type>
</mime-mapping>

To

<mime-mapping>
    <extension>js</extension>
    <mime-type>application/javascript;charset=UTF-8</mime-type>
</mime-mapping>
kintoki
  • 318
  • 2
  • 11