private DynamicSpriteFont(byte[] ttf, int defaultSize, int textureWidth, int textureHeight, int blur) { _fontSystem = new FontSystem(textureWidth, textureHeight, blur) { FontSize = defaultSize }; _fontSystem.AddFontMem(ttf); }
DynamicSpriteFont(GraphicsDevice graphicsDevice, byte[] ttf, int defaultSize, int textureWidth, int textureHeight, int blur, int stroke) { var textureCreator = new Texture2DCreator(graphicsDevice); _fontSystem = new FontSystem(StbTrueTypeSharpFontLoader.Instance, textureCreator, textureWidth, textureHeight, blur, stroke) { FontSize = defaultSize }; _fontSystem.AddFontMem(ttf); }
private DynamicSpriteFont(byte[] ttf, float defaultSize, int textureWidth, int textureHeight) { var fontParams = new FontSystemParams { Width = textureWidth, Height = textureHeight, IsAlignmentTopLeft = true }; _fontSystem = new FontSystem(fontParams); _fontSystem.Alignment = Alignment.Top; _defaultFontId = _fontSystem.AddFontMem(DefaultFontName, ttf); Size = defaultSize; }
private DynamicSpriteFont(byte[] ttf, float defaultSize, int textureWidth, int textureHeight) { var fontParams = new FontSystemParams { Width = textureWidth, Height = textureHeight, Flags = FontSystem.FONS_ZERO_TOPLEFT }; _fontSystem = new FontSystem(fontParams); _fontSystem.Alignment = FontSystem.FONS_ALIGN_TOP; _defaultFontId = _fontSystem.AddFontMem(DefaultFontName, ttf); Size = defaultSize; }
public void AddTtf(byte[] ttf) { _fontSystem.AddFontMem(ttf); }
public int AddTtf(string name, byte[] ttf) { return(_fontSystem.AddFontMem(name, ttf)); }