private void Initialize(GraphicsDevice graphicsDevice, FontStb font, float height, string text) { name = (text + height.ToString()).GetHashCode().ToString(); this.graphicsDevice = graphicsDevice; this.font = font; this.text = text; this.height = height; GetGlyph(); }
private void Initialize(GraphicsDevice graphicsDevice, FontStb font, float height) { this.graphicsDevice = graphicsDevice; this.font = font; this.height = height; Glyphs = new Dictionary <char, Glyph>(); Glyph[] Glyph = font.GetGlyphsFromCodepoint(height, new int[] { 'A', '国' }, 1f, 1f); defaultGlyph = Glyph[0]; defaultGlyphCn = Glyph[1]; }
public void Refresh(FontStb font, float height, string text) { Initialize(graphicsDevice, font, height, text); }
public DynamicTextureTextStb(GraphicsDevice graphicsDevice, FontStb font, float height, string text) : base(graphicsDevice, ((text + height.ToString()).GetHashCode()).ToString()) { Initialize(graphicsDevice, font, height, text); }
public DynamicTextureFont(GraphicsDevice graphicsDevice, FontStb font, float height) : base(graphicsDevice) { Initialize(graphicsDevice, font, height); }