Default font for Windows Forms application

后端 未结 9 1372
有刺的猬
有刺的猬 2020-12-08 07:06

Every time that I create a new form in my application, it uses the \"Microsoft Sans Serif, 8.25pt\" font by default. I\'m not changing it because I know that in this case my

9条回答
  •  情话喂你
    2020-12-08 07:16

    Yes, it uses the font returned by GetStockObject(DEFAULT_GUI_FONT). Which is MS Sans Serif. An old font, long gone from most machines. The font mapper translate it to, no surprise, Microsoft Sans Serif.

    There is no documented procedure I know of to change that default font, the SDK docs mention MS Sans Serif explicitly. If you want Segoe, you'll have to ask for it. Which isn't that safe to do, there are still a lot of XP machines out there without Office 2007. The font mapper will translate it on a machine that doesn't have Segoe available. Not sure what pops out, I don't have such a machine left anymore.

提交回复
热议问题