63 references to Name
System.Drawing.Common.Tests (55)
System\Drawing\FontConverterTests.cs (1)
193return installedFonts.Families.Select(t => t.Name).Contains(string.Empty);
System\Drawing\FontFamilyTests.cs (11)
20Assert.Equal(expectedName, fontFamily.Name); 31Assert.Equal(expectedName, fontFamily.Name); 41Assert.Equal("Code New Roman", fontFamily.Name); 108Assert.Equal(families[i].Name, familiesWithGraphics[i].Name); 113using FontFamily copy = new(fontFamily.Name); 114Assert.Equal(fontFamily.Name, copy.Name); 125Assert.Equal("Courier New", fontFamily2.Name); 134Assert.Equal("Microsoft Sans Serif", fontFamily2.Name); 143Assert.Equal("Times New Roman", fontFamily2.Name);
System\Drawing\FontTests.cs (38)
65VerifyFont(font, fontFamily.Name, emSize, FontStyle.Regular, GraphicsUnit.Point, 1, false); 79using Font font = new(fontFamily.Name, emSize); 80VerifyFont(font, fontFamily.Name, emSize, FontStyle.Regular, GraphicsUnit.Point, 1, false); 107VerifyFont(font, fontFamily.Name, emSize, style, GraphicsUnit.Point, 1, false); 121using Font font = new(fontFamily.Name, emSize, style); 122VerifyFont(font, fontFamily.Name, emSize, style, GraphicsUnit.Point, 1, false); 147VerifyFont(font, fontFamily.Name, emSize, FontStyle.Regular, unit, 1, false); 161using Font font = new(fontFamily.Name, emSize, unit); 162VerifyFont(font, fontFamily.Name, emSize, FontStyle.Regular, unit, 1, false); 189VerifyFont(font, fontFamily.Name, emSize, style, unit, 1, false); 203using Font font = new(fontFamily.Name, emSize, style, unit); 204VerifyFont(font, fontFamily.Name, emSize, style, unit, 1, false); 231VerifyFont(font, fontFamily.Name, emSize, style, unit, gdiCharSet, false); 245using Font font = new(fontFamily.Name, emSize, style, unit, gdiCharSet); 246VerifyFont(font, fontFamily.Name, emSize, style, unit, gdiCharSet, false); 273VerifyFont(font, fontFamily.Name, emSize, style, unit, gdiCharSet, gdiVerticalFont); 287using Font font = new(fontFamily.Name, emSize, style, unit, gdiCharSet, gdiVerticalFont); 288VerifyFont(font, fontFamily.Name, emSize, style, unit, gdiCharSet, gdiVerticalFont); 300using Font font = new($"@{family.Name}", 10); 301Assert.Equal(family.Name, font.Name); 302Assert.Equal($"@{family.Name}", font.OriginalFontName); 320Assert.Equal(family.Name, copy.Name); 361AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize)); 363AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic)); 365AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, GraphicsUnit.Document)); 367AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document)); 369AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10)); 371AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true)); 382AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, unit)); 384AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit)); 386AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10)); 388AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true)); 399Assert.Equal(font.Name, clone.FontFamily.Name); 577lfFaceName = family.Name, 585VerifyFont(font, family.Name, font.Size, fontStyle, GraphicsUnit.World, charSet, expectedGdiVerticalFont: false); 722Assert.Equal($"{expectedNamePrefix}{family.Name}", logFont.lfFaceName); 756Assert.Equal(family.Name, logFont.lfFaceName); 853Assert.Equal($"[Font: Name={family.Name}, Size=10, Units=4, GdiCharSet=10, GdiVerticalFont=True]", font.ToString());
System\Drawing\Text\PrivateFontCollectionTests.cs (5)
31Assert.Equal("Code New Roman", fontFamily.Name); 48Assert.Equal("Code New Roman", fontFamily.Name); 65Assert.Equal("Code New Roman", fontFamily.Name); 85Assert.Equal("Code New Roman", fontFamily.Name); 147Assert.Equal("Code New Roman", font.Name);
System.Windows.Forms (1)
System\Windows\Forms\Rendering\FontCache.Data.cs (1)
68string familyName = font.FontFamily.Name;
System.Windows.Forms.Tests (6)
SerializableTypesTests.cs (6)
191Assert.Equal(FontFamily.GenericSansSerif.Name, result.Font.FontFamily.Name); 239Assert.Equal(FontFamily.GenericSansSerif.Name, result.Font.FontFamily.Name); 380Assert.Equal(FontFamily.GenericSansSerif.Name, result.NodeFont.FontFamily.Name);
WindowsFormsIntegration (1)
System\Windows\Integration\Convert.cs (1)
224return new SWM.FontFamily(sdFamily.Name);