开发者

How do you get the default system font in the .NET compact framework?

开发者 https://www.devze.com 2022-12-14 06:06 出处:网络
How can I get the Font object for the default system font used by the particular device?I\'ve noticed that different devices have different resolutions and DPIs, but some of my controls have explicitl

How can I get the Font object for the default system font used by the particular device? I've noticed that different devices have different resolutions and DPIs, but some of my controls have explicitly defined fonts. I'd like to 开发者_开发技巧be able to get the default system font at runtime (as if I never changed the Font property on the control).


Have you looked into System.Drawing.SystemFonts? I think it may have what you need.

https://msdn.microsoft.com/en-us/library/system.drawing.systemfonts.aspx

Edit: I just noticed the CF tag. You will need to look at the registry to get the system font information.

https://msdn.microsoft.com/en-us/library/ms900747.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消