package ocamlsdl

  1. Overview
  2. Docs
exception SDLttf_exception of string
val init : unit -> unit
val quit : unit -> unit
type font
val open_font : string -> ?index:int -> int -> font
type font_style =
  1. | NORMAL
  2. | BOLD
  3. | ITALIC
  4. | UNDERLINE
val get_font_style : font -> font_style list
val set_font_style : font -> font_style list -> unit
val font_height : font -> int
val font_ascent : font -> int
val font_descent : font -> int
val font_lineskip : font -> int
val font_faces : font -> int
val is_fixed_width : font -> bool
val family_name : font -> string
val style_name : font -> string
val size_text : font -> string -> int * int
val size_utf8 : font -> string -> int * int
val glyph_metrics : font -> char -> int * int * int * int
type render_kind =
  1. | SOLID of Sdlvideo.color
  2. | SHADED of Sdlvideo.color * Sdlvideo.color
  3. | BLENDED of Sdlvideo.color
val render_text_solid : font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
val render_text_shaded : font -> string -> fg:Sdlvideo.color -> bg:Sdlvideo.color -> Sdlvideo.surface
val render_text_blended : font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
val render_utf8_solid : font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
val render_utf8_shaded : font -> string -> fg:Sdlvideo.color -> bg:Sdlvideo.color -> Sdlvideo.surface
val render_utf8_blended : font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
val render_text : font -> render_kind -> string -> Sdlvideo.surface
val render_glyph_solid : font -> char -> fg:Sdlvideo.color -> Sdlvideo.surface
val render_glyph_shaded : font -> char -> fg:Sdlvideo.color -> bg:Sdlvideo.color -> Sdlvideo.surface
val render_glyph_blended : font -> char -> fg:Sdlvideo.color -> Sdlvideo.surface
val render_glyph : font -> render_kind -> char -> Sdlvideo.surface
OCaml

Innovation. Community. Security.