kintoki
kintoki

Reputation: 318

Vis.js font-awesome icons rendered as characters

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?

Upvotes: 1

Views: 816

Answers (1)

kintoki
kintoki

Reputation: 318

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>

Upvotes: 1

Related Questions