XmlContent Data Property Delta Engine Documentation

Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public XmlData Data { get; set; }

Property Value

Type: XmlData
Remarks

Tests: DeltaEngine.Rendering2D.Fonts.Tests.FontDataTests
Examples

1 unit tests call DeltaEngine.Content.Xml.XmlContent.Data
[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