[Top][All Lists]

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

[Devel] Freetype bitmap to Windows DIB?

From: Ron Olson
Subject: [Devel] Freetype bitmap to Windows DIB?
Date: Mon, 11 Mar 2002 22:31:08 -0500

Aloha all-

I'm new to FreeType, having stumbled across it in a recent Slashdot
article. Having had a look around the site, trying the sample code, I'm
extremely impressed, and discovering this library comes at a rather good
time as I'm currently working on a graphics project where I would like
the type quality to be its best.

Unfortuantly, working with the library has exposed a weakness in my
knowledge of graphics programming under Win32. I'm very familiar with
the DDB window format, GDI, DCs, etc. DIBs are something I've never
worked with before, and frankly, I'm stumped. 

Before I'm told to go pick up a good graphics programming book, I'll say
that yes, I do have said good graphics books, but all the examples of
StretchDIBits(), SetDIBitsToDevice(), etc., doth not a happy person make
when it comes to working with the bitmap created by the FF library.

I have looked through the demo code, but the display library in
grwin32.c makes use of its own structures and the like, which I've tried
to trace back to their source, but it's left me confused; grwin32.c uses
a HBITMAP (hbm) and a LPBITMAPINFO (pbmi) structure, but nowhere in the
code have I found where the bits are set by the renderer.

My process of rendering is pretty much straight from the documentation,
but it's that "my_draw_bitmap()" function they leave blank that is what
I've spent the past 3 days trying to write with no success. Does the
bitmap structure inside FT_GlyphSlot conform to a DIB? Comparing fields,
it seems like a good deal of it is there, but the bitmap header does not
seem to include fields that a DIB header expects, like height (I've
tried using "rows" with zero success).

I'm willing to post the laughably pathetic examples of what I've tried
to do so far, but I'm more hoping for "here's some sample code, now go

Again, I apologize for my lack of knowledge in this particular area, and
I know this isn't the most appropriate place, and I promise that once
I've figured it out I'll stick to Freetype specific questions, should
they arise. :)

Thank you,

Ron Olson

reply via email to

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