public void ToHfont_SimpleFont_Roundtrips()
{
using (FontFamily family = FontFamily.GenericSansSerif)
using (var font = new Font(family, 10))
{
IntPtr hfont = font.ToHfont();
Assert.NotEqual(IntPtr.Zero, hfont);
Assert.NotEqual(hfont, font.ToHfont());
Font newFont = Font.FromHfont(hfont);
Assert.Equal(font.Name, newFont.Name);
}
}