1 Apr 2010 16:03
[ft] Using SVG Font Glyph Data In FreeType
Andy Kellett <andy <at> f1-software.com>
2010-04-01 14:03:37 GMT
2010-04-01 14:03:37 GMT
Hi, I am working on a project that uses an SVG file containing custom font data. All the data for working with the fonts are present in the SVG file, and I have been scouring the freetype documentation for ways to work with this data directly in FreeType. All the examples I can find access a font (such as TTF) and extract the glyps directly from it; Im looking for a way where I can tell SVG the glyph data I want to use, and how to then make freetype render it to a bitmap so I can put it on screen. An example of the SVG is here: <glyph unicode="a" horiz-adv-x="444" d="M11,0L111,0L144,184L300,184L333,0L433,0L286,722L170,722L11,0M222,616L224,616L286,268L159,268L222,616 Z" /> <glyph unicode="b" horiz-adv-x="389" d="M37,0L194,0C340,0,360,50,360,206C360,329,344,356,264,371L264,373C332,382,355,405,355,547C355,679,334,722,211,722L37,722L37,0M137,334L202,334C257,334,266,318,266,209C266,95,256,78,199,78L137,78L137,334M137,644L184,644C248,644,261,624,261,542C261,424,255,412,195,412L137,412L137,644 Z" /> <glyph unicode="e" horiz-adv-x="315" etc. If anyone can point me in the right direction to a tutorial, or something explaining how to manually add glyph data without having to pull from a TTF, I would be very grateful. Thanks. Kind Regards,(Continue reading)
> The port is very much a work in progress, but I've just made my first check-in.
>
RSS Feed