bitmap font hex numbering (redbook example)

in the redbook figure 8.1 shows an f as a bitmap.
can someone please explain the use of the hex numbers in the example. Why does it go from 0xc0 to 0x00? what number say would half the lenght of the top of the f be i carnt figure out how the hex is working so that i can plot them myself.

:slight_smile:

Hi !

You have to look at the binary pattern for the hex number, a hex digit is built up of 4 bits, so 0xf0 has binary bit pattern 11110000, 0xc0 has binary pattern 11000000 and so on, the 1 is “black” pixels and the 0 are “white” pixels in the picture.

Mikael

how do you work out what binary pattern a hex value has.

why is 0xc0 11000000

:slight_smile:

http://www.semsim.com/ccna/tutorial/binary-hex/numbers.html

Originally posted by gs384:
[b]how do you work out what binary pattern a hex value has.

why is 0xc0 11000000

:slight_smile: [/b]
I cheat.

enum BinaryNumber {
   b00000000,
   b00000001,
   b00000010,
   b00000011,
   .
   .
   .
   b11111111
};

raster font and glut raster font example

thanx for the links ill check them out :slight_smile: