GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class Font

    Represents a font with information about glyph size, spacing, and glyph atlas.

    Inheritance
    object
    Font
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Graphics
    Assembly: Genesis.dll
    Syntax
    public class Font

    Constructors

    Font()

    Initializes a new instance of the Font class.

    Declaration
    public Font()

    Properties

    Column

    Gets or sets the number of columns in the glyph atlas.

    Declaration
    public int Column { get; set; }
    Property Value
    Type Description
    int

    FontAtlas

    Gets or sets the bitmap containing the font atlas.

    Declaration
    public Bitmap FontAtlas { get; set; }
    Property Value
    Type Description
    Bitmap

    GlyphSize

    Gets or sets the size of each glyph in the font.

    Declaration
    public float GlyphSize { get; set; }
    Property Value
    Type Description
    float

    Glyphes

    Gets or sets the list of glyphs in the font.

    Declaration
    public List<Glyphe> Glyphes { get; set; }
    Property Value
    Type Description
    List<Glyphe>

    Name

    Gets or sets the name of the font.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    RenderID

    Gets or sets the render ID associated with the font.

    Declaration
    public int RenderID { get; set; }
    Property Value
    Type Description
    int

    Rows

    Gets or sets the number of rows in the glyph atlas.

    Declaration
    public int Rows { get; set; }
    Property Value
    Type Description
    int

    Spacing

    Gets or sets the spacing between glyphs.

    Declaration
    public float Spacing { get; set; }
    Property Value
    Type Description
    float

    Methods

    Base64ToImage(string)

    Converts a base64-encoded image string to a Bitmap.

    Declaration
    public Bitmap Base64ToImage(string base64)
    Parameters
    Type Name Description
    string base64

    The base64-encoded image string.

    Returns
    Type Description
    Bitmap

    The decoded Bitmap image.

    FromFile(string)

    Loads font information from an XML file.

    Declaration
    public void FromFile(string file)
    Parameters
    Type Name Description
    string file

    The path to the XML file containing font information.

    GetGlyphe(char)

    Gets the glyph associated with a specific character.

    Declaration
    public Glyphe GetGlyphe(char character)
    Parameters
    Type Name Description
    char character

    The character for which to retrieve the glyph.

    Returns
    Type Description
    Glyphe

    The glyph associated with the specified character.

    LoadSystemFont(string)

    Loads a system font with a default set of glyphs.

    Declaration
    public static Font LoadSystemFont(string fontName)
    Parameters
    Type Name Description
    string fontName

    The name of the system font to load.

    Returns
    Type Description
    Font

    The loaded system font.

    In this article
    Back to top Generated by DocFX