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