[OpenJDK 2D-Dev] Howto know a glyph is lcd or grayscale?
Phil Race
Phil.Race at Sun.COM
Tue Apr 28 18:00:32 UTC 2009
Clemens Eisserer wrote:
> Hi,
>
> Existing pipelines seem to use a rowBytes==width check to decide
> wether a glyph is lcd or grayscale.
That's to decide what to do during rendering, and that logic is there
not to decide if its greyscale per se, but because LCD strikes can
still have B&W glyphs in them from embedded bitmaps in CJK fonts.
The "greyscale" images in an LCD strike are in fact always fully
on or fully off pixels.
> I ran into problems with that approach when image==NULL, like for the
> space-glyph - putting it into the wrong cache.
It should go into the cache based on the signature of the strike
which is described by the FontStrikeDesc class. How you propagate
that into your XRender cache should, I expect, fall out of how
you associate these.
-phil.
>
> Is there any other way to determine if a glyph is lcd, or a GlyphList
> contains lcd or grayscale glyphs?
>
> Thanks, Clemens
More information about the 2d-dev
mailing list