freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Fw: outline points


From: Werner LEMBERG
Subject: Re: [ft] Fw: outline points
Date: Mon, 24 Dec 2012 08:16:13 +0100 (CET)

> The question is: is there any way to receive set of points
> describing an outline of given glyph instead of a set of rules and
> control points describing the bezier functions, from which outline
> is composed of?

Aah, better English indeed does help!  No, FreeType doesn't provide
this directly.  However, here are some ideas:

  . If you are using the grayscale rasterizer, just write a callback
    function which prints out the spans of a stroked glyph.  Both the
    callback technique and the use of the stroker is demonstrated in a
    tutorial file:

      http://www.freetype.org/freetype2/docs/tutorial/example2.cpp

  . Since the B/W rasterizer does two passes, callbacks don't work.
    Instead I suggest to simply render a glyph into a bitmap, then
    walking over the result line by line, returning all points where
    the colour changes from white to black (and from black to white).


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]