/// <inheritdoc/> public override void GetCodePointRenderInfo(Int32 c, out GlyphRenderInfo info) { if (c < 0 || c > Char.MaxValue) { c = SubstitutionCharacter; } var texture = this.texture; var textureRegion = glyphs[(Char)c]; var advance = textureRegion.Width; info = new GlyphRenderInfo { Texture = texture, TextureRegion = textureRegion, Advance = advance, }; }
/// <inheritdoc/> public override void GetGlyphIndexRenderInfo(Int32 glyphIndex, out GlyphRenderInfo info) => throw new NotSupportedException();
/// <summary> /// Gets the information required to draw the specified glyph. /// </summary> /// <param name="glyphIndex">The glyph index of the glyph to draw.</param> /// <param name="info">The rendering information for the specified glyph.</param> public abstract void GetGlyphIndexRenderInfo(Int32 glyphIndex, out GlyphRenderInfo info);
/// <summary> /// Gets the information required to draw the specified glyph. /// </summary> /// <param name="c">The 32-bit Unicode value of the glyph to draw.</param> /// <param name="info">The rendering information for the specified glyph.</param> public abstract void GetGlyphRenderInfo(Int32 c, out GlyphRenderInfo info);
/// <summary> /// Gets the information required to draw the specified Unicode code point. /// </summary> /// <param name="codePoint">The 32-bit Unicode value of the glyph to draw.</param> /// <param name="info">The rendering information for the specified glyph.</param> public abstract void GetCodePointRenderInfo(Int32 codePoint, out GlyphRenderInfo info);