vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
2.03k stars 301 forks source link

Default font does not support label special characters #26

Closed gaiterjones closed 3 years ago

gaiterjones commented 3 years ago

Special characters in labels are showing as question marks i.e.

N?man instead of Nüman

I think this is because the default font helvetiker regular doesn't support special characters. How do I uselabelTypeFace([typeface ]) to specify a different/custom label font created with facetype.js or is there another built in font I can use, or am I doing something wrong with special characters?

gaiterjones commented 3 years ago

So I did get it working with something like this using optimer_regular which supports special characters.

var labelfont:
    $.getJSON('https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/fonts/optimer_regular.typeface.json', function(data) {
        labelfont = data;
    });
...
.labelTypeFace(labelfont)
...