public static Graphics.SpriteFont CreateSpriteFontData(IFontFactory fontFactory, SpriteFontAsset options, Glyph[] glyphs, float lineSpacing, float baseLine, Bitmap bitmap, bool srgb, int margin = 0) { var fontGlyphs = ConvertGlyphs(glyphs); var images = new[] { GetImage(options, bitmap, srgb) }; var sizeInPixels = options.FontType.Size; return(fontFactory.NewStatic(sizeInPixels, fontGlyphs, images, baseLine, lineSpacing, null, options.Spacing, options.LineSpacing, options.DefaultCharacter, margin)); }
public static Graphics.SpriteFont CreateSpriteFontData(IFontFactory fontFactory, SpriteFontAsset options, Glyph[] glyphs, float lineSpacing, float baseLine, Bitmap bitmap) { var fontGlyphs = ConvertGlyphs(glyphs); var images = new[] { GetImage(options, bitmap) }; var sizeInPixels = FontHelper.PointsToPixels(options.Size); return(fontFactory.NewStatic(sizeInPixels, fontGlyphs, images, baseLine, lineSpacing, null, options.Spacing, options.LineSpacing, options.DefaultCharacter)); }
public static Graphics.SpriteFont CreateSpriteFontData(IFontFactory fontFactory, SpriteFontAsset options, Glyph[] glyphs, float lineSpacing, float baseLine, Bitmap bitmap) { var fontGlyphs = ConvertGlyphs(glyphs); var images = new[] { GetImage(options, bitmap) }; var sizeInPixels = FontHelper.PointsToPixels(options.Size); return fontFactory.NewStatic(sizeInPixels, fontGlyphs, images, baseLine, lineSpacing, null, options.Spacing, options.LineSpacing, options.DefaultCharacter); }