Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font backward incompatibility

I am using Segoe UI for my winforms application.

On XP, this font doesn't exist and I would like to have my app use Verdana instead.

What's the best way of achieving that.

like image 673
WOPR Avatar asked Feb 17 '26 05:02

WOPR


1 Answers

It is always better to use default (system) font to achieve native look. So Vista uses 'Sergoe UI' as default font, and XP uses 'Tahoma' for this (not 'Verdana'). To get default dialog font use SystemFonts class:

protected override void OnLoad(EventArgs e)
{
  base.OnLoad(e);
  Font = SystemFonts.DialogFont;
}
like image 129
arbiter Avatar answered Feb 21 '26 14:02

arbiter