3

I'm trying to change the font of my console application to the Raster Font. Here is an image of the font and where you can set it:

CMD Screenshot

My question is how can I do this in my C++ application? Is there a certain name for it? This is what I have so far:

CONSOLE_FONT_INFOEX cf;
cf.cbSize = sizeof cf;
cf.dwFontSize.X = 6;
cf.dwFontSize.Y = 8;
wcscpy_s(cf.FaceName, L"NEED NAME HERE");
SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), 0, &cf);

"Raster", "Raster Font", "Raster Fonts", "RasterFont", "RasterFonts", "Font Raster", "Fonts Raster", "FontRaster", "FontsRaster", and "Font" all haven't worked for me. Is there a different way to set it or some different name it goes by?

Asesh
  • 3,186
  • 2
  • 21
  • 31
vidsac
  • 84
  • 12

1 Answers1

5

You can set font face name to terminal for raster font:

CONSOLE_FONT_INFOEX cf = {0};
cf.cbSize = sizeof cf;
cf.dwFontSize.X = 6;
cf.dwFontSize.Y = 8;
wcscpy_s(cf.FaceName, L"Terminal");
SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), 0, &cf);
Asesh
  • 3,186
  • 2
  • 21
  • 31