FontDataTests LoadFontData Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Fonts.Tests
Assembly: DeltaEngine.Rendering2D.Fonts.Tests (in DeltaEngine.Rendering2D.Fonts.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void LoadFontData()
Examples

[Test, CloseAfterFirstFrame]
public void LoadFontData()
{
    var fontData = new FontDescription(ContentLoader.Load<Font>("Verdana12").Data);
    Assert.AreEqual("Verdana", fontData.FontFamilyName);
    Assert.AreEqual(12, fontData.SizeInPoints);
    Assert.AreEqual("AddOutline", fontData.Style);
    Assert.AreEqual(16, fontData.PixelLineHeight);
    Assert.AreEqual("Verdana12Font", fontData.FontMapName);
    Assert.AreEqual(new Size(128, 128), fontData.FontMapPixelSize);
    Assert.AreEqual(new Rectangle(0, 0, 1, 16), fontData.GlyphDictionary[' '].UV);
    Assert.AreEqual(7.34875f, fontData.GlyphDictionary[' '].AdvanceWidth);
}
See Also