Search code examples
c#.netwpfvectorglyph

How to get a glyph as vectors


I'm aware of the GlyphTypeface.GetGlyphOutline() in WPF but what I need is to get a center-vector of each glyph, like the lines you draw with a pencil. Is this possible somehow using the existing glyph's of a fontface?


Solution

  • You could take the glyph polygon and produce the so called Straight Skeleton of the polygon.

    http://en.wikipedia.org/wiki/Straight_skeleton

    For an algorithm, see e.g (Felkel 1998)

    http://www.dma.fi.upm.es/mabellanas/tfcs/skeleton/html/documentacion/straight%20skeletons%20implementation.pdf