Access to a Bitmap font's ... bmap

Posted By: Error014

Access to a Bitmap font's ... bmap - 12/06/12 22:05

So I have a Bitmap-font defined like this:

Code:
FONT* mainfont = "HUD\\Font.bmp";



I can use it normally, as expected, in Texts. So far, so good.

Now I want to access it's bitmap content. acktypes.h tells me:

Code:
typedef struct FONT {
	C_LINK link;
	int	dx,dy;		// width/height of a single character for bitmap fonts
	int	num;		// number of characters - 11, 128, or 256
	int	cpl;		// characters per bitmap line, or -1 for a TTF font
	char	*type;		// image file or truetype font name
	BMAP	bmap;		// bitmap that holds the characters
   byte  pad[PAD_FONT];
} FONT;



So shouldn't something like this:

Code:
DEBUG_BMAP( &(mainfont->bmap), 200,1);



show me the bitmap?

It doesn't - it crashes.
I can access dx, dy just fine (used these to test this), and I can even get the correct width of the bitmap via

Code:
error(str_for_int(NULL,(mainfont->bmap).width));



The manual is very sparse about this topic, so I'm a little lost. Can anyone help me out?
Posted By: EvilSOB

Re: Access to a Bitmap font's ... bmap - 12/08/12 02:00

Off the top of my head, have you tried

DEBUG_BMAP( mainfont->bmap, 200,1);

or

DEBUG_BMAP( mainfont.bmap, 200,1);
Posted By: Error014

Re: Access to a Bitmap font's ... bmap - 12/08/12 02:38

Thanks for the reply!

Sadly, both of these don't work either.
© 2024 lite-C Forums