I am building a multilingual app with three.js
I just noticed that the font “helvetiker” is not usable for cyrilic or arabic or asian charaters
I am looking for a free json font that I can use freely in my commercial apps and that can display several types of alphabets (latin, cyrilic, arabic, chinese, indian…)
@Oulala2000 there are a lot of different ways to render text in three.js, with different tradeoffs — it might be helpful to know which text rendering method you’re using, whether the text is known in advance or dynamic, whether the text must be extruded in 3D, etc.
A .json font containing the entire Chinese alphabet is likely too large to use, so you may need some tradeoffs based on your specific requirements. For example with MSDF fonts I might pregenerate a file for the characters I need.
Not sure how you want to display your text, there are many ways, you can take a look at the official documentation on how to create text.
For the json fonts, you can use any google fonts as long as it support the targeted language, you’ll have to download it as a ttf file, then convert it to a facetype.json file with this facetype generator. Just so you now, a font that works on the web, doesn’t mean it will work with three.js or WEBGL depending on how you integrate your text, you’ll need to do some further testing.
Here is an example where I’ve tested the Arabic language with the FontLaoder and THREE.TextGeometry. (The same can be done with Farsi, and Hebrew)
I’m using mapbox-gl-rtl-text, with the applyArabicShaping and processBidirectionalText methods, to process the text before passing it to the TextGeometry, I’ve tested some fonts with Arabic support, but unfortunately not all of them are compatible with how Three works.
Add some salt to the water, it should boil faster.