Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Rendering2D.Fonts.Tests TextConverterTests
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
The TextConverterTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TextConverterTests | Initializes a new instance of the TextConverterTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
GetGlyphs | ||
GetGlyphsRightAligned | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, CloseAfterFirstFrame] public void GetGlyphs() { var fontData = new FontDescription(ContentLoader.Load<Font>("Verdana12").Data); var textConverter = new TextConverter(fontData.GlyphDictionary, fontData.PixelLineHeight); var glyphs = textConverter.GetRenderableGlyphs(" ", HorizontalAlignment.Center); Assert.AreEqual(4, glyphs.Length); }
[Test, CloseAfterFirstFrame] public void GetGlyphsRightAligned() { var fontData = new FontDescription(ContentLoader.Load<Font>("Verdana12").Data); var textConverter = new TextConverter(fontData.GlyphDictionary, fontData.PixelLineHeight); var glyphs = textConverter.GetRenderableGlyphs("A a a aaa", HorizontalAlignment.Right); Assert.AreEqual(9, glyphs.Length); }
See Also