Example #1
0
        public SpriteFont NewStatic(float size, IList<Glyph> glyphs, IList<Image> images, float baseOffset, float defaultLineSpacing, IList<Kerning> kernings = null, float extraSpacing = 0, float extraLineSpacing = 0, char defaultCharacter = ' ')
        {
            var font = new StaticSpriteFont(size, glyphs, null, baseOffset, defaultLineSpacing, kernings, extraSpacing, extraLineSpacing, defaultCharacter) { FontSystem = this };

            // affects the textures from the images.
            foreach (var image in images)
                font.StaticTextures.Add(Texture.New(GraphicsDevice, image).DisposeBy(font));

            return font;
        }
Example #2
0
        public SpriteFont NewStatic(float size, IList <Glyph> glyphs, IList <Image> images, float baseOffset, float defaultLineSpacing, IList <Kerning> kernings = null, float extraSpacing = 0, float extraLineSpacing = 0, char defaultCharacter = ' ')
        {
            var font = new StaticSpriteFont(size, glyphs, null, baseOffset, defaultLineSpacing, kernings, extraSpacing, extraLineSpacing, defaultCharacter)
            {
                FontSystem = this
            };

            // affects the textures from the images.
            foreach (var image in images)
            {
                font.StaticTextures.Add(Texture.New(GraphicsDevice, image).DisposeBy(font));
            }

            return(font);
        }