private nk_font(byte[] ttf, int textureWidth, int textureHeight) { var fontParams = new FontSystemParams { Width = textureWidth, Height = textureHeight, Flags = FontSystem.FONS_ZERO_TOPLEFT }; _fontSystem = new FontSystem(fontParams); _fontSystem.Alignment = Alignment.Top; _defaultFontId = _fontSystem.AddFontMem(DefaultFontName, ttf); _fontSystem.Size = DefaultSize; }
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; }