public void ValidGetFirstFontHelveticaPath() { var path = new DirectoryInfo(System.Environment.CurrentDirectory); using (var reader = new TypefaceReader(path)) { var file = new FileInfo(ValidateHelvetica.UrlPath); var face = reader.GetFirstFont(file); Assert.IsNotNull(face); ValidateHelvetica.AssertTypeface(face); } }
public void ValidGetFirstFontHelveticaUrl() { var path = new Uri(ValidateHelvetica.RootUrl); using (var reader = new TypefaceReader(path)) { var url = new Uri(ValidateHelvetica.UrlPath, UriKind.Relative); var face = reader.GetFirstFont(url); ValidateHelvetica.AssertTypeface(face); } }
public async Task ValidGetFontHelveticaUrlAndIndex() { var path = new Uri(ValidateHelvetica.RootUrl); using (var reader = new TypefaceReader(path)) { var url = new Uri(ValidateHelvetica.UrlPath, UriKind.Relative); var face = await reader.GetFontAsync(url, 0); Assert.IsNotNull(face); ValidateHelvetica.AssertTypeface(face); } }
public void ValidGetFontHelveticaUrlInfoAndIndex() { var path = new Uri(ValidateHelvetica.RootUrl); using (var reader = new TypefaceReader(path)) { var file = new Uri(ValidateHelvetica.UrlPath, UriKind.Relative); var info = reader.ReadTypeface(file); var face = reader.GetFont(info, 0); Assert.IsNotNull(face); ValidateHelvetica.AssertTypeface(face); } }
public async Task ValidGetFontHelveticaPathAndIndex() { var path = new DirectoryInfo(System.Environment.CurrentDirectory); using (var reader = new TypefaceReader(path)) { var file = new FileInfo(ValidateHelvetica.UrlPath); var face = await reader.GetFontAsync(file, 0); Assert.IsNotNull(face); ValidateHelvetica.AssertTypeface(face); } }
public void ValidGetTypefacesHelveticaUrl() { var path = new Uri(ValidateHelvetica.RootUrl); using (var reader = new TypefaceReader(path)) { var url = new Uri(ValidateHelvetica.UrlPath, UriKind.Relative); var faces = reader.GetFonts(url); Assert.IsNotNull(faces); var all = faces.ToArray(); Assert.AreEqual(1, all.Length); ValidateHelvetica.AssertTypeface(all[0]); } }
public void ValidGetTypefacesHelveticaPath() { var path = new DirectoryInfo(System.Environment.CurrentDirectory); using (var reader = new TypefaceReader(path)) { var file = new FileInfo(ValidateHelvetica.UrlPath); var faces = reader.GetFonts(file); Assert.IsNotNull(faces); var all = faces.ToArray(); Assert.AreEqual(1, all.Length); ValidateHelvetica.AssertTypeface(all[0]); } }
public void ValidGetFontHelveticaUrlAndReference() { var path = new Uri(ValidateHelvetica.RootUrl); using (var reader = new TypefaceReader(path)) { var uri = new Uri(ValidateHelvetica.UrlPath, UriKind.Relative); var info = reader.ReadTypeface(uri); var fref = info.Fonts[0]; //Load from a known url and a font reference var face = reader.GetFont(uri, fref); Assert.IsNotNull(face); ValidateHelvetica.AssertTypeface(face); } }
public void ValidGetFontHelveticaFileInfoAndIndex() { var path = new DirectoryInfo(System.Environment.CurrentDirectory); using (var reader = new TypefaceReader(path)) { var file = new FileInfo(ValidateHelvetica.UrlPath); var info = reader.ReadTypeface(file); //Get the font with the info and an index of 0 var face = reader.GetFont(info, 0); Assert.IsNotNull(face); ValidateHelvetica.AssertTypeface(face); } }