Facetype.js: A typeface.js generator

Everything save for the embedding of the font glyphs was part of threejs up to the late r70s. Then people noticed that the old font system was not really kept up, and then @gero3 came along and fixed that, subsequently changing the way that text geometry works, and requiring the removal of the last code snipped to be removed from the source.

Essentially the issue lies in where to get the font from:

geometry = new Geometries[ data.type ](
                                data.text, {
                                    font: font,
                                    size: data.data.size,
                                    height: data.data.height
                                });
                            
        break; 

I suppose there would need to be a sort of ‘fontSource’ and the code could be like:

case ‘TextGeometry’:

  geometry = new Geometries[ data.type ](
                            data.text, {
                                font: new FontLoader.load( data.fontSource ), // or new Font(data.fontSource);
                                size: data.data.size,
                                height: data.data.height
                            });
                        
    break;