I gave it a go, and added a new render mode to ftgl:
FTTriangleExtractorFont(char const *fontFilePath, std::vector<float>&
The vector will receive a triangle strip for processing in whatever
rendering system (WebGL, DirectX, Hoops ...)
The first impression is not bad in my WebGl app.
A diff is attached.
Now, how should I proceed? My preferred way would be to have it included
in the ftgl library.
If you agree, I will clean up things to make it ready for inclusion.
Am Mittwoch, den 17.08.2011, 12:56 +0200 schrieb Richard Ulrich:
> Hi Sam,
> Thanks for the quick response.
> I didn't mention an important detail:
> I work with WebGL in C++ through the excellent WT library:
> So, Transferring of the data is no problem.
> My research prototype is here:
> I started with the texture mode directly with libfreetype, but I would
> prefer the tesselated texts because it's probably easier to get the ray
> picking and editing right.
> And in the current desktop version of our CAD, we also use tesselated
> texts from the Windows GDI. Now with the new core we want to make it
> platform independent, and especially my WebGL prototype runs mainly on
> So, with the current implementation of ftgl, is it possible to get the
> tesselation, so I can feed the triangles to WebGL myself?
> And it yes, could you give me some hints on where to start?
> On Wed, 2011-08-17 at 11:33 +0200, Sam Hocevar wrote:
> > On Sun, Aug 14, 2011, Richard Ulrich wrote:
> > > I'm looking into how to render text with WebGL.
> > > By chance I found the ftgl library, and I'm wondering if I can use it
> > > with WebGl. I coudn't find anything that could answer my question in the
> > > documentation nor the mail archive.
> > > I'm fully aware, that I would'nt get the full funtionality, but if I get
> > > the texture maps or polygon meshes that I could then use in WebGl, that
> > > would already be a hughe help. Or would I use Freetype directly for
> > > that?
> > Unfortunately WebGL does not offer the ability to link with native
> > code (unless directly provided by the browser), so FTGL would be of
> > little use.
> > It would be possible to retrieve the font tesselation or the font
> > texture (depending on the chosen rendering method), but that would also
> > require exporting the whole glyph information from FreeType, store
> > all of this in an interchange format, then write a WebGL importer and
> > renderer for it. That's a lot of work and probably far beyond the scope
> > of FTGL.
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________ Ftgl-devel mailing list Ftgl-devel@... https://lists.sourceforge.net/lists/listinfo/ftgl-devel