Namespace: DeltaEngine.Rendering2D.Fonts.Tests
Assembly: DeltaEngine.Rendering2D.Fonts.Tests (in DeltaEngine.Rendering2D.Fonts.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Rendering2D.Fonts.Tests (in DeltaEngine.Rendering2D.Fonts.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
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