sig
exception SDLttf_exception of string
val init : unit -> unit
external quit : unit -> unit = "sdlttf_kill"
type font
external open_font : string -> ?index:int -> int -> Sdlttf.font
= "sdlttf_open_font"
type font_style = NORMAL | BOLD | ITALIC | UNDERLINE
external get_font_style : Sdlttf.font -> Sdlttf.font_style list
= "sdlttf_get_font_style"
external set_font_style : Sdlttf.font -> Sdlttf.font_style list -> unit
= "sdlttf_set_font_style"
external font_height : Sdlttf.font -> int = "sdlttf_font_height"
external font_ascent : Sdlttf.font -> int = "sdlttf_font_ascent"
external font_descent : Sdlttf.font -> int = "sdlttf_font_descent"
external font_lineskip : Sdlttf.font -> int = "ml_TTF_FontLineSkip"
external font_faces : Sdlttf.font -> int = "ml_TTF_FontFaces"
external is_fixed_width : Sdlttf.font -> bool
= "ml_TTF_FontFaceIsFixedWidth"
external family_name : Sdlttf.font -> string = "ml_TTF_FontFaceFamilyName"
external style_name : Sdlttf.font -> string = "ml_TTF_FontFaceStyleName"
external size_text : Sdlttf.font -> string -> int * int
= "sdlttf_size_text"
external size_utf8 : Sdlttf.font -> string -> int * int
= "sdlttf_size_utf8"
external glyph_metrics : Sdlttf.font -> char -> int * int * int * int
= "sdlttf_glyph_metrics"
type render_kind =
SOLID of Sdlvideo.color
| SHADED of Sdlvideo.color * Sdlvideo.color
| BLENDED of Sdlvideo.color
external render_text_solid :
Sdlttf.font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_text_solid"
external render_text_shaded :
Sdlttf.font ->
string -> fg:Sdlvideo.color -> bg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_text_shaded"
external render_text_blended :
Sdlttf.font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_text_blended"
external render_utf8_solid :
Sdlttf.font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_utf8_solid"
external render_utf8_shaded :
Sdlttf.font ->
string -> fg:Sdlvideo.color -> bg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_utf8_shaded"
external render_utf8_blended :
Sdlttf.font -> string -> fg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_utf8_blended"
val render_text :
Sdlttf.font -> Sdlttf.render_kind -> string -> Sdlvideo.surface
external render_glyph_solid :
Sdlttf.font -> char -> fg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_glyph_solid"
external render_glyph_shaded :
Sdlttf.font ->
char -> fg:Sdlvideo.color -> bg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_glyph_shaded"
external render_glyph_blended :
Sdlttf.font -> char -> fg:Sdlvideo.color -> Sdlvideo.surface
= "sdlttf_render_glyph_blended"
val render_glyph :
Sdlttf.font -> Sdlttf.render_kind -> char -> Sdlvideo.surface
end