freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Curious regression in ftview on MacOS X


From: Steve Hartwell
Subject: [Devel] Curious regression in ftview on MacOS X
Date: Sun, 12 Dec 2004 00:23:39 -0800

I recently built ftview on MacOS X and have discovered that the antialiased view (the default) is showing bluish color tinges around the edges of the glyphs instead of grayscale antialiasing.

I saw this problem awhile back when I was adding rgb32 support to the mac version of the graphics surface, and found it to be due to the assumption in the existing mono- and gray-to-RGB32 code that RGB bytes are stored first, with the unused byte following (i.e. RGBx). Since on MacOS X, the GDI requires that for RGB32, the unused byte must come first (i.e. xRGB), the easiest solution was to offset the MacOS X GDI base address by -1; it was a bit of a hack, but legal, and it worked without touching the rest of the ftview code.

Well, now 256-gray glyphs are rendered with the GBlender code, which is very nice, but its code stores RGB32 as xRGB already, so my GDI offset is wrong for that case.

However, the original mono-to-RGB32 conversion is still used when antialiasing is turned off, which still assumes an RGBx alignment.

So we probably ought to resolve this; suggestions?

Regards,

Steve Hartwell
http://stevehartwell.home.comcast.net/proj/fontinspector

PS.: There are two bugs in grblit.c:blit_mono_to_rgb32(), lines 453 and 459, which should be "_read++", without which the non-antialiased glyph doesn't render properly anyway; my apologies for not having noticed this when submitting the original patch.




reply via email to

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