freetype
[Top][All Lists]
Advanced

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

RE: [ft] Thick contours


From: Laurent Auneau
Subject: RE: [ft] Thick contours
Date: Wed, 30 Mar 2005 18:17:02 +0200

I actually wanted to do what Adam described. Applying his method of NSEW
instead of my diagonals worked very good. I read somewhere that one should
prefer diagonals offsets, this was obviously wrong.

It is to note that this method fails quickly when you want a thickness
superior to 1 pixel. I managed to workaround for 2 pixels width, rendering 8
times (2 pixels offset NSEW, and 1 pixel offset diagonals), worked very
well. Still, rendering 9 times should be the maximum.

Leonard, for my application, performance wise, rendering 5 times is better
than generating a second texture for the outlines, as long as you don't
display a screen full of text. As outline is preferred for titles (or
subtitles in movies), this seems the good way to me. Nonetheless, this
method is the best for a few line of texts, with a low thickness, and not
more. It has the second advantage to be straightforward to implement.

But, you can't render only the outlines, and this is a shame. AS I don't
have a need for this right now, I won't delve deeper into this, but knowing
that it can be done is a good point. Can FreeType handle the rasterizing of
these strokes alone?

Thanks for the thoughts of all of you, and the fast answers.

Laurent


-----Message d'origine-----
De : address@hidden
[mailto:address@hidden De la part
de Leonard Rosenthol
Envoyé : mercredi 30 mars 2005 17:54
À : address@hidden; address@hidden
Objet : Re: [ft] Thick contours

At 10:33 AM 3/30/2005, Adam D. Moss wrote:
>I don't think that'd help in this case... I believe Laurent wants
>a font-with-an-outline, not the outline of the font

         What's the difference?

         A glyph is a shape that can either be filled (or the normal 
operation for FT), stroked (what Laurent appears to be trying to achieve) 
or both.


>(not to mention that I'm quite dubious that looping through the same
>trivial rasterization code five times [applying it in hardware,
>even] is 'a LOT of work' compared with tesselating a vector font
>outline into GL primitives and then taking a second different pass
>for a thickened outline including mitres etc).

         I agree - which is why you can skip the multiple rasterization & 
blitting - and JUST go with vector outlines.


>But being able to extract the vector outline information for a font
>sounds pretty useful in general.  Which part of the FT docs cover
>this?

         FT_Outline_Decompose()


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:address@hidden>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                              215-938-0880 (fax)




_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype





reply via email to

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