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: Ruslan Nikolaev
Subject: Re: [ft] Question about hinting and direct rendering
Date: Mon, 3 Jun 2013 13:59:48 -0700 (PDT)

Thanks very much! I also have one more question regarding direct rendering. 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). But this is for the case if I do not use direct rendering, right? 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?

Thanks,
Ruslan


From: Werner LEMBERG <address@hidden>
To: address@hidden
Cc: address@hidden
Sent: Sunday, June 2, 2013 5:09 PM
Subject: Re: [ft] Question about hinting and direct rendering


> I have a question regarding hinting (e.g., using TTF hinting rather
> than auto-hinting) and direct rendering.  It seems that
> FT_Outline_Render can be used for direct rendering but will it
> actually use TTF hinting or I should use FT_Render_Glyph for that
> (i.e., no direct rendering)?

The normal processing is


                hinting                scan-conversion
  glyph data --------------> outline -------------------> bitmap


Since both FT_Outline_Render and FT_Render_Glyph work on outlines, no
hinting is involved if you call one of these functions.

> Also, I am confused about FT_Load_Glyph which loads a glyph to a
> slot.  But a slot FT_GlyphSlotRec contains bitmap, does it mean that
> bitmap is already prepared by doing Load_Glyph?  If so, how to avoid
> it for direct rendering?

The bitmap field in FT_GlyphSlotRec is for convenience.  If you don't
render the glyph (this is, if FT_LOAD_RENDER is not used), the field
is not used.

Can you suggest an improvement to the documentation?


    Werner



reply via email to

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