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