public void AddViaStreamReturnsDescription()
        {
            var suit = new FontCollection();
            IEnumerable <FontFamily> collectionFromPath = suit.AddCollection(TestFonts.SSimpleTrueTypeCollectionData(), out IEnumerable <FontDescription> descriptions);

            Assert.Equal(2, collectionFromPath.Count());
            FontFamily openSans = Assert.Single(collectionFromPath, x => x.Name == "Open Sans");
            FontFamily abFont   = Assert.Single(collectionFromPath, x => x.Name == "SixLaborsSampleAB");

            Assert.Equal(2, descriptions.Count());
            FontDescription openSansDescription = Assert.Single(descriptions, x => x.FontNameInvariantCulture == "Open Sans");
            FontDescription abFontDescription   = Assert.Single(descriptions, x => x.FontNameInvariantCulture == "SixLaborsSampleAB regular");
        }
Esempio n. 2
0
        public void InstallViaStreamhReturnsDecription()
        {
            var sut = new FontCollection();
            var collectionFromPath = sut.InstallCollection(TestFonts.SSimpleTrueTypeCollectionData(), out var descriptions);

            Assert.Equal(2, collectionFromPath.Count());
            var openSans = Assert.Single(collectionFromPath, x => x.Name == "Open Sans");
            var abFont   = Assert.Single(collectionFromPath, x => x.Name == "SixLaborsSampleAB");

            Assert.Equal(2, descriptions.Count());
            var openSansDescription = Assert.Single(descriptions, x => x.FontName == "Open Sans");
            var abFontDescription   = Assert.Single(descriptions, x => x.FontName == "SixLaborsSampleAB regular");
        }