PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Drawing a font with ClearType?

davidboydca · 28 Mar 2006, 18:35 UTC
I can display normal text just fine with GapiDraw.

I do the following using CGapiDisplay::CreateOffscreenDisplay():

CGapiSurface::GetDC()
CreateFontIndirect()
ExtTextOut()
CGapiSurface::ReleaseDC()

Now, I'm trying to show ClearType. I set the flag like so:

logFont.lfQuality = CLEARTYPE_QUALITY;

and my ensured my phone (MPX220) can support it by turning it only globally.

However, I just see normal text, not ClearType.

I found this on Google Groups:
---------------------------------
What's the bit depth of the bitmap you're creating? FYI on CE if you try to draw antialiased or cleartype text to a memory dc, it must have a bitmap from CreateCompatibleBitmap selected into it (it has to match the bit depth and color masks of the primary), otherwise it'll draw draft text.
---------------------------------

So, is the bitmap that GapiDraw uses created using CreateCompatibleBitmap() or does it use some other bitdepth?

Thanks,
David
Is it possible to create and use an anti-aliased font saved in PNG format with canal alpha, like creation of surfaces can do (GDSURFACE_ALPHA flag)?