freetype-devel
[Top][All Lists]
Advanced

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

RE: [Devel] freetype LCD filtering


From: Turner David
Subject: RE: [Devel] freetype LCD filtering
Date: Thu, 22 Jan 2004 14:51:22 +0100

Hello Sebastien,

> -----Original Message-----
> From: address@hidden [mailto:address@hidden
> Behalf Of Sebastien Kunz-Jacques
> Sent: Thursday, January 22, 2004 2:06 PM
> To: address@hidden
> Subject: [Devel] freetype LCD filtering
> 
> 
> Hello everybody,
> 
> I am new to this list and I am not fully aware of all
> the developpement going on around freetype; nor do I
> have (yet!) a good understanding of the structure of
> the code. 
> 
> I have implemented a simple algorithm for performing
> LCD linear filtering on an antialiased image computed
> in horizontal LCD mode. Instead of modifying the
> library, I simply implemented the filtering in ftview.
> This work raised several questions:
> 
> - In view of the insertion of this filtering feature
> in the freetype lib, are there some changes to be done
> on the application side to be able to display 24-bit
> RGB glyph pictures ? Is anybody aware of applications
> requiring only a minor rework ?

Yes, because you need RGB-decimated alpha-blending to
properly display such glyphs on any background, with
any color.

Most graphics libraries don't have this capability, and
you can't emulate it with more basic operations (e.g.
by using a series of 3 "normal" alpha-blends with different
sources).

The only open-source implementations that are available right
now are:
  
  - the portion of the XFree86 RENDER extension that performs
    RGB-decimated alpha-blending.

  - the portion of the FT2Demos package's "graph" sub-module,
    which also implements this

There are other implementations in Windows XP, MacOS X or
Adobe's Acrobat Reader, to name a few.

As far as I know, this capability is not hardware-accelerated
by graphics cards yet, though the use of recent pixel shading
language might prove me wrong.

> - In experiencing with a nonlinear filtering aimed at
> increasing glyph contrast,  I noticed that the
> antialiasing algorithm used by freetype changes
> between 34 and 35pt : exact coverage for ppem<35,
> supersampling above. the supersampling gives
> lower-quality results than the exact coverage algo;
> where do I have to modify the freetype source in order
> to use the exact coverage algorithm everytime? What is
> the order of magnitude of the performance loss?
> 

I don't see what you're speaking about ? FreeType doesn't
switch rendering algorithms based on the character pixel
sizes. And switching to super-sampling _above_ 35 pixels
would be a disaster in terms of performance anyway.

> If someone is interested by the filtering code, I can
> post it on the list.
> 
Yes, we'd be interested in seeing this code.

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)

PS: Note that we don't have plans to integrate
    RGB-decimated alpha-blending into FreeType itself
    (it's a graphics library issue, not a font engine
    one).

    We may however extract the corresponding code from
    FT2Demos to make it more easily usable by other
    graphics libs though...

--
This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender.
Any use not in accordance with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The E-Mail transmission can not guarantee the integrity of this message.
NDS TECHNOLOGIES FRANCE will not therefore be liable for the message if 
modified.





reply via email to

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