23 references to AddFontFile
System.Drawing.Common.Tests (23)
System\Drawing\FontFamilyTests.cs (9)
38
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
177
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
191
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
203
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
222
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.ttf"));
232
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
244
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
256
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
268
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
System\Drawing\FontTests.cs (1)
338
collection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
System\Drawing\Text\PrivateFontCollectionTests.cs (13)
27
fontCollection.
AddFontFile
(Helpers.GetTestBitmapPath("empty.file"));
28
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
45
fontCollection.
AddFontFile
(relativePath);
61
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.ttf"));
62
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.ttf"));
78
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.ttf"));
79
fontCollection.
AddFontFile
(Helpers.GetTestFontPath("CodeNewRoman.otf"));
93
AssertExtensions.Throws<ArgumentNullException>("filename", "path", () => fontCollection.
AddFontFile
(null));
100
AssertExtensions.Throws<FileNotFoundException>(() => fontCollection.
AddFontFile
(string.Empty));
107
Assert.Throws<FileNotFoundException>(() => fontCollection.
AddFontFile
("fileName"));
115
() => fontCollection.
AddFontFile
(new string('a', 261)));
122
AssertExtensions.Throws<FileNotFoundException, ExternalException>(() => fontCollection.
AddFontFile
(AppContext.BaseDirectory));
131
AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.
AddFontFile
(typeof(Font).Assembly.Location));