freetype
[Top][All Lists]
Advanced

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

Re: [ft] Question about hinting and direct rendering


From: Werner LEMBERG
Subject: Re: [ft] Question about hinting and direct rendering
Date: Tue, 04 Jun 2013 07:50:13 +0200 (CEST)

> Oftentimes, bounding box is calculated for the entire string before
> rendering; hence while processing the string, FT_Get_Glyph is used
> to obtain and copy glyphs for future rending (e.g., by keeping
> references to them in an array).

This is one possibility.  You might use FreeType's cache system also
for this purpose, which is probably simpler and more efficient.

> But this is for the case if I do not use direct rendering, right?

It is not related.  As explained earlier, direct rendering happens one
stage later than retrieving the outlines (and caching them).

> I was wondering if using FT_Outline_New and FT_Outline_Copy in place
> of FT_Get_Glyph would be OK for direct rendering or is there any
> better/more suitable approach?

I suggest that you first try to make your application work with the
simplest FreeType calls to get used to it.  Later on you can improve
that by adding direct rendering support.  The file `example4.cpp' in
the tutorial shows both buffer based and direct rendering at the same
time; it's really just a minor difference between the two methods.
Caching is shown in the ftview demo program, for example.

  http://freetype.org/freetype2/docs/tutorial/example4.cpp


    Werner



reply via email to

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