using System;
using System.Runtime.InteropServices;
namespace Raylib_cs
{
///
/// Font type, defines generation method
///
public enum FontType
{
///
/// Default font generation, anti-aliased
///
FONT_DEFAULT = 0,
///
/// Bitmap font generation, no anti-aliasing
///
FONT_BITMAP,
///
/// SDF font generation, requires external shader
///
FONT_SDF
}
///
/// GlyphInfo, font characters glyphs info
///
[StructLayout(LayoutKind.Sequential)]
public partial struct GlyphInfo
{
///
/// Character value (Unicode)
///
public int value;
///
/// Character offset X when drawing
///
public int offsetX;
///
/// Character offset Y when drawing
///
public int offsetY;
///
/// Character advance position X
///
public int advanceX;
///
/// Character image data
///
public Image image;
}
///
/// Font, font texture and GlyphInfo array data
///
[StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Font
{
///
/// Base size (default chars height)
///
public int baseSize;
///
/// Number of characters
///
public int glyphCount;
///
/// Padding around the glyph characters
///
public int glyphPadding;
///
/// Texture atlas containing the glyphs
///
public Texture2D texture;
///
/// Rectangles in texture for the glyphs
///
public Rectangle* recs;
///
/// Glyphs info data
///
public GlyphInfo* glyphs;
}
}