views:

80

answers:

1

I have a bezier path library to draw complex bezier paths without problem. Now, I need to know how to read a text or font and extract its path information to draw it as a path instead of as text.

I came across a C applicaiton, FontForge. It does exactly what I need, picks any font and extract its path information. But what I need to know is how it does it to add that feature to my drawing library.

A: 

You can use windows GDI function GetGlyphOutline.

Alternatively use BeginPath, TextOut, EndPath and GetPath. You will obtain a list of straight segments and Beziers. See this article for inspiration (a bit dated, but relevant).

Roman Zenka