Open nrei0 opened 9 years ago
Hey Andy, you might need to downgrade your version of Node to get it working. Can you run node -v
and let me know the output?
My suggestion for 3D text in WebGL is to use bitmaps glyphs with distance fields. This leads to nice crisp edges at any size, lower filesize than vector JSON, and it tends to look pretty good at small sizes.
This module is using some of my latest utils for word wrapping and glyph layout:
https://github.com/Jam3/three-bmfont-text/
There is some docs there for turning TTF into BMFont files.
Matt
Sent from my iPhone
On Apr 11, 2015, at 2:37 AM, Andy Tyurin notifications@github.com wrote:
Hey Matt!
There is a problem when installing fontpath via npm. I use command: sudo npm install fontpath but then i get an error: https://drive.google.com/file/d/0BzxbsmpZqdGZdmprYVcwMUphS2s/view?usp=sharing https://drive.google.com/file/d/0BzxbsmpZqdGZelg4SUtmNkpkbTg/view?usp=sharing
My main goal is to make 3d webtext via threejs with kerning by converting ttf to js format.
Do you have any suggestions?
Thanks, Andy.
My system: OSX 10.10
— Reply to this email directly or view it on GitHub.
v0.12.2. Nice work! I have read the description of your utils / modules, but couldn't find anything about converting ttf to bmfont. If not hard, please, give me a link to stuff.
Regards, Andy
Sure, there's some tools discussed here: https://github.com/libgdx/libgdx/wiki/Hiero
LibGDX's Hiero includes a SDF filter. There are steps on generating SDF fonts here: https://github.com/libgdx/libgdx/wiki/Distance-field-fonts
Unfortunately it uses Java to run. You might also be able to convert to BMFont with another tool (like Littera) and then apply the SDF after the fact. This could cause some bleeding between glyphs, so make sure to use a large padding.
Eventually I'd love to see more tools in JavaScript/Node so people don't need to download JREs and GUI tools just to convert ttf to BMFont. :smile: Let me know if you hit any other snags.
Hi,
Which version of NodeJs works well?
For others who end up here, Node version 0.10.48 gets this engine started
Hey Matt!
There is a problem when installing fontpath via npm. I use command: sudo npm install fontpath but then i get an error: https://drive.google.com/file/d/0BzxbsmpZqdGZdmprYVcwMUphS2s/view?usp=sharing https://drive.google.com/file/d/0BzxbsmpZqdGZelg4SUtmNkpkbTg/view?usp=sharing
My main goal is to make 3d webtext via threejs with kerning by converting ttf to js format.
Do you have any suggestions?
Thanks, Andy.
My system: OSX 10.10