I am trying to use System.Windows.Media.Typeface
to get some details of a font.
When I use it in my WinForms
application the UI is resizing and the fonts are changing.
I noticed that my display resolution is at 125%. When I test this on 100% screen it does not happen.
Is there any issue of referencing PresentationCore.Dll in a winforms app. Or is it about Typeface class.
namespace WindowsFormsApp1
{
public partial class WinFormample : Form
{
public WinFormample()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
System.Windows.Media.Typeface t = new System.Windows.Media.Typeface("Arial");
}
}
}