package graphv_core

  1. Overview
  2. Docs

Module Make.TextSource

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