1
Programming / C# change font and font size at runtime
« on: October 30, 2017, 02:57:40 PM »
I'm in the process of creating a rougelike and to assure my game displays correctly I am wanting to change the console font and font size at runtime. Specifically font NSimSum and font size 32.
I am very new to programming and c# so I'm hoping this can be explained simply.
This page (https://docs.microsoft.com/en-us/windows/console/console-font-infoex) list the full syntax of the CONSOLE_FONT_INFOEX structure:
But I have no idea how to implement this into my existing code.
I am very new to programming and c# so I'm hoping this can be explained simply.
This page (https://docs.microsoft.com/en-us/windows/console/console-font-infoex) list the full syntax of the CONSOLE_FONT_INFOEX structure:
Code: [Select]
typedef struct _CONSOLE_FONT_INFOEX {
ULONG cbSize;
DWORD nFont;
COORD dwFontSize;
UINT FontFamily;
UINT FontWeight;
WCHAR FaceName[LF_FACESIZE];
} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;
But I have no idea how to implement this into my existing code.