Thanks, I will definitely check that out. I appreciate your help, and I'll let you know if I have any other questions after I dig a little deeper into fonttools.
David Morris wrote:It's not really set up to make it easy to get out. Each glyph that's
> I would like to be able to export a string of 3D extruded text as an
> OBJ or similar 3D file format, and I can't find any examples on the
> I have played around with the solid_font.py demo in the
> OpenGLContext/tests/ folder, which uses FontTools to display the text,
> but I don't know how to get that mesh data back out.
created has contour and outline arrays, which are extracted by
ttfquery.glyph.Glyph, but the advances and the like are all done at the
Font level (OpenGLContext.scenegraph.text._fonttools and
OpenGLContext.scenegraph.text.fonttools), without those you'd just have
characters showing up piled on top of each other. That said, there's
only maybe 1000 lines of code in all three modules, so if you want to
extract the pieces you need you could likely do it in a few hours. The
obscure stuff is all over in ttfquery, the stuff in OpenGLContext just
takes the contours for each glyph and figures out how to render them
based on a VRML97 font description.
Mike C. Fletcher
Designer, VR Plumber, Coder