Font sizes

  • Thread starter Thread starter Alberto
  • Start date Start date
A

Alberto

How can I find out if the application is running in a system with small or
big fonts?
Thank you
 
//Gets the Default DPI
Form form = new Form();
Graphics graphics = form.CreateGraphics();

if ((graphics.DpiY / (float) 96) == 1F)
Console.WriteLine("Normal Font");
else if ((graphics.DpiY / (float) 120) == 1F)
Console.WriteLine("Big Font");
else
Console.WriteLine("Custom Font");

Gustavo
 
Back
Top