Ejemplo n.º 1
0
        public void TestGlyphBoundsWithoutM()
        {
            string hello    = "Hello";
            var    font     = new TestFont(10);
            var    provider = TestGlyphBoundsProvider.Instance;
            var    glyphRun = new AttributedGlyphRun <TestFont, TGlyph>(hello, hello, font);
            var    width    = provider.GetTypographicWidth(font, glyphRun);

            Approximately.Equal(width, 25, 0.01);
        }
Ejemplo n.º 2
0
        public void TestGlyphBoundsWithM()
        {
            string america  = "America";
            var    font     = new TestFont(10);
            var    provider = TestGlyphBoundsProvider.Instance;
            var    glyphRun = new AttributedGlyphRun <TestFont, TGlyph>(america, america, font);
            var    width    = provider.GetTypographicWidth(font, glyphRun);

            Approximately.Equal(width, 40, 0.01);
        }