vasturiano / three-spritetext

A sprite based text component for ThreeJS
https://vasturiano.github.io/three-spritetext/example/basic/
MIT License
340 stars 46 forks source link

how to load a font for fontface #50

Closed wirmachenbunt closed 2 months ago

wirmachenbunt commented 2 months ago

how to load a font for fontface, its not clear how to do it and its not shown in the example

wirmachenbunt commented 2 months ago

`//Font loading var myFont = new FontFace("myFont", "url(fonts/open-sans.woff2)");

myFont.load().then(function (font) {
  document.fonts.add(font);
  console.log("Font loaded");
});`