exception Font_error of string
Raised when an error occur in this module
Glyph | Representation of a character |
This module stores a font and dynamically loads sizes and glyphs as requested by the user
exception Font_error of string
type t
type code = [ `Char of char | `Code of int]
val load : string -> t
val glyph : t -> code -> int -> bool -> Glyph.t
glyph font code size bold
returns the glyph representing the character code
in font
of size size
and with the modifier bold
val kerning : t -> code -> code -> int -> float
val ascent : t -> int -> float
val descent : t -> int -> float
val linegap : t -> int -> float
val spacing : t -> int -> float
val texture : (module RenderTarget.T with type t = 'a) -> 'a -> t -> Texture.Texture2DArray.t
Font.size_index
to get the layer associated to a font size. This texture is not mipmapped.
val size_index : t -> int -> int