How do I draw the raster fonts used by the Windows console in a GDI application? For instance, the 8x8 fixed font as shown in this screenshot.
Can these fonts be used via the CreateFont() API, or is there some special way that Windows loads these fonts?
The console uses
"fixed width fonts"
, such as"Courier New"
(available in all Windows version) or"Consolas"
(available since Vista).Fixed width fonts are not necessarily raster. To use raster fonts, enumerate fonts to find a raster font such as
"Terminal"
or"Fixedsys"
. You have to use the right size (example, 18 for"Terminal"
font) otherwise Windows may substitute a different font and resize. There are also issues with DPI settings. If program is not DPI aware then magnification will occur if work station has high DPI settings.