package wall

  1. Overview
  2. Docs
type glyph_placement = [
  1. | `Aligned
  2. | `Subpixel
]
type t = {
  1. glyphes : Stb_truetype.t;
  2. size : float;
  3. blur : float;
  4. spacing : float;
  5. line_height : float;
  6. placement : glyph_placement;
}
val make : ?size:float -> ?blur:float -> ?spacing:float -> ?line_height:float -> ?placement:glyph_placement -> Stb_truetype.t -> t
type metrics = {
  1. ascent : float;
  2. descent : float;
  3. line_gap : float;
}
val font_metrics : t -> metrics
val text_width : t -> string -> float
type measure = {
  1. width : float;
  2. height : float;
  3. depth : float;
}
val text_measure : t -> string -> measure
OCaml

Innovation. Community. Security.