Fixed Pitch Fonts...
Posted on 1999-06-25
The SDI application I’m working on has a fixed window size of (0, 0, 640, 480) with no title bar, tool bar, client edge… i.e. just a 640x480 plain white box. My application has the requirements of having 30 rows of text each having 80 characters. It’s not uncommon for adjacent text to have different foreground and background colors and it’s important that my font is uniform in width and height so that the background colors meet flush and the characters all line up vertically and horizontally. I’m trying to set up a font using LOGFONT that will accomplish this. Basically each character needs to be 8x16. I also need to setup a font that is a double sized character (16x32) that exactly takes up the width and height of 4 smaller font characters. How do I accomplish this? I have tried using lfPitchAndFamily = FIXED_PITCH but still when I output a ‘W’ and an ‘i’ with background colors different than the windows color they have different widths.