Example #1
0
        static Graphics.Font.Glyph[] ConvertGlyphs(Glyph[] glyphs)
        {
            var fontGlyphs = new Graphics.Font.Glyph[glyphs.Length];

            for (var i = 0; i < glyphs.Length; ++i)
            {
                var glyph = glyphs[i];
                fontGlyphs[i] = new Graphics.Font.Glyph
                {
                    Character = glyph.Character,
                    Subrect   = new Core.Mathematics.Rectangle(glyph.Subrect.X, glyph.Subrect.Y, glyph.Subrect.Width, glyph.Subrect.Height),
                    Offset    = new Vector2(glyph.XOffset, glyph.YOffset),
                    XAdvance  = glyph.XAdvance,
                };
            }

            return(fontGlyphs);
        }
        static Graphics.Font.Glyph[] ConvertGlyphs(Glyph[] glyphs)
        {
            var fontGlyphs = new Graphics.Font.Glyph[glyphs.Length];

            for (var i = 0; i < glyphs.Length; ++i)
            {
                var glyph = glyphs[i];
                fontGlyphs[i] = new Graphics.Font.Glyph
                {
                    Character = glyph.Character,
                    Subrect = new Core.Mathematics.Rectangle(glyph.Subrect.X, glyph.Subrect.Y, glyph.Subrect.Width, glyph.Subrect.Height),
                    Offset = new Vector2(glyph.XOffset, glyph.YOffset),
                    XAdvance = glyph.XAdvance,
                };
            }

            return fontGlyphs;
        }