freetype
[Top][All Lists]
Advanced

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

Re: [ft] Text outline rendering


From: Wojciech Mamrak
Subject: Re: [ft] Text outline rendering
Date: Tue, 18 Jun 2013 12:53:12 +0200

> There are the issues of spacing, alignment, ASCII code to glyph number... Is 
> that also built-in ?

The latter is (ASCII is the subset of Unicode, and Unicode charmap is
default in FT), so basically you don't have to worry about anything.
If you had to deal with some Unicode encoded string (like UTF8), then
you would have to extract each charcode/code point at first.
If by spacing you mean advancing from one character to another, then
yes as well.
Yet with text alignment you will have to deal by yourself or use some
other library.

2013/6/18 Yves Daoust <address@hidden>:
>
>
> Suzuki,
>
>
>
> Thank you for the quick answer.
>
>
>
> FT_Outline_Decompose seems to be exactly what I need. Actually, I deal with
> the FXG file format, a close relative to SVG. But I do process the curves
> before saving them.
>
>
>
> Now I assume I have to code the generation of the outlines from the given
> string. There are the issues of spacing, alignment, ASCII code to glyph
> number... Is that also built-in ?
>
>
>
> If your code shows how to accomplish that, for sure I’d be glad to look at
> it.
>
>
>
>                 Yves
>
>
>
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of suzuki toshiya
> Sent: Tuesday, June 18, 2013 11:28 AM
> To: address@hidden
> Subject: Re: [ft] Text outline rendering
>
>
>
> Hi Yves,
>
>
>
> To retrieve the vector data from TTF via FreeType2, FT_Outline_Decompose()
> function would be useful. Giving a function pointer table calling the
> functions to move currentpoint, or to draw straight, cubic or conic curves,
>
> FT_Outline_Decompose()
>
> calls them to trace the vector data in the "outline" member in glyph slot.
>
>
>
> I've ever written a small sample making SVG by calling
> FT_Outline_Decompose().
>
> If you want, I will send it.
>
>
>
> Regards,
>
> mpsuzuki
>
>
>
> On 06/18/2013 06:05 PM, Yves Daoust wrote:
>
>>                  Hi All,
>
>>
>
>> I am new to FreeType.
>
>>
>
>> I am involved in a project where text needs to be rendered in vector form.
>> I mean I have text strings, font information (TTF), possible geometric
>> transforms, and I need to generate the corresponding outlines in vector form
>> (sequences of Bezier arcs, so just lists of control point coordinates; I
>> don’t need the rendered bitmap).
>
>>
>
>> After a first search in the documentation, I am convinced that all the
>> required machinery is there but I want to be sure this is feasible. If yes,
>> where can I start ?
>
>>
>
>> Regards,
>
>>
>
>>                  Yves Daoust
>
>>
>
>>
>
>>
>
>> _______________________________________________
>
>> Freetype mailing list
>
>> address@hidden
>
>> https://lists.nongnu.org/mailman/listinfo/freetype
>
>>
>
>
>
>
>
> _______________________________________________
>
> Freetype mailing list
>
> address@hidden
>
> https://lists.nongnu.org/mailman/listinfo/freetype
>
>
> _______________________________________________
> Freetype mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/freetype
>



reply via email to

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