type font
type bounds
=
{
}
val text : t -> x:float -> y:float -> ?start:int -> ?end_:int -> string -> unit
val text_w : t -> x:float -> y:float -> ?start:int -> ?end_:int -> string -> float
val find_font : t -> name:string -> font option
val set_size : t -> size:float -> unit
val set_blur : t -> blur:float -> unit
val set_line_height : t -> height:float -> unit
val set_letter_spacing : t -> spacing:float -> unit
val set_align : t -> align:Align.t -> unit
val set_font_face : t -> name:string -> unit
val set_font_face_id : t -> id:int -> unit
val create : t -> name:string -> file:string -> font option
val bounds : t -> x:float -> y:float -> ?start:int -> ?end_:int -> string -> bounds
type metrics
=
{
ascender : float; |
descender : float; |
line_height : float; |
}
val metrics : t -> metrics
type text_row
=
{
start_index : int; |
end_index : int; |
width : float; |
minx : float; |
maxx : float; |
next : int; |
}
val break_lines : t -> break_width:float -> max_rows:int -> ?start:int -> ?end_:int -> lines:text_row array -> string -> int
val make_empty_rows : int -> text_row array
type glyph_position
=
{
index : int; |
x : float; |
min_x : float; |
max_x : float; |
}
val empty_glyph_position : glyph_position
val glyph_positions : t -> x:float -> y:float -> ?start:int -> ?end_:int -> glyphs:glyph_position array -> string -> int
val text_box : t -> x:float -> y:float -> break_width:float -> ?start:int -> ?end_:int -> string -> unit
val box_bounds : t -> x:float -> y:float -> break_width:float -> ?start:int -> ?end_:int -> string -> Bounds.t
val add_fallback_id : t -> font:font -> fallback:font -> unit
val add_fallback : t -> name:string -> fallback:string -> unit
val reset_fallback_id : t -> font:font -> unit
val reset_fallback : t -> name:string -> unit