开发者

How to convert any text/font to its bezier path representation?

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 application, FontForge. It d开发者_如何学Pythonoes 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.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜