public static FigletFont Load(string filePath) { if (filePath == null) { throw new ArgumentNullException(nameof(filePath)); } return(FigletFont.Parse(File.ReadLines(filePath))); }
public static FigletFont Parse(string fontContent) { if (fontContent == null) { throw new ArgumentNullException(nameof(fontContent)); } return(FigletFont.Parse(fontContent.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None))); }
public static FigletFont Load(Stream stream) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } List <string> fontLines = new List <string>(); using (StreamReader streamReader = new StreamReader(stream)) { while (!streamReader.EndOfStream) { fontLines.Add(streamReader.ReadLine()); } } return(FigletFont.Parse(fontLines)); }