public void ReadFontInfo() => File.OpenRead(InfFileName).Using(stream => { var fontInfo = FontInfo.Read(stream); Assert.Equal(364, fontInfo.CharacterCount); Assert.Equal(512, fontInfo.ImageWidth); Assert.Equal(64, fontInfo.MaxImageHeight); Assert.Equal(12, fontInfo.CharacterWidth); Assert.Equal(12, fontInfo.CharacterHeight); });
public void WriteBackFontInfo() => Helpers.AssertStream(File.OpenRead(InfFileName), stream => { var outStream = new MemoryStream(); FontInfo.Read(stream).Write(outStream); return outStream; });