[Top][All Lists]

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

[ft-devel] Small issues in code comments

From: Sylvain Pasche
Subject: [ft-devel] Small issues in code comments
Date: Wed, 16 Jan 2008 20:52:08 +0100
User-agent: Thunderbird (X11/20071031)


I've been looking at the lcd filtering code when discussing the implementation of lcd filtering inside the Cairo library. I saw a few small issues in comments.


  /* FIR filter used by the default and light filters */
  static void
  _ft_lcd_filter_legacy( FT_Bitmap*      bitmap,
                         FT_Render_Mode  mode,
                         FT_Library      library )

Looks like some leftover cut and paste. That function is used by the legacy filter only, and is not a FIR filter according to Keith Packard (who implemented it in Xft): "it's an intra-pixel filter, which means the three components have different curves; green gets a three-element gaussian, while r and b get sloping filters to left and right."

There is also an apparently wrong "/* horizontal in-place FIR filter */" comment in the function body.


in the <Enum> FT_Render_Mode
/* <Note> */ /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are */ /* _not_ _filtered_ to reduce color-fringes. It is up to the caller */ /* to perform this pass. */

This is not always true any more, now that lcd filtering is available. The note could mention the availability of the FT_LcdFilter function (if support is compiled).

Hope that helps,

reply via email to

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