View Source Image.Options.Text (image v0.54.4)

Options for text drawing.

Summary

Types

@type t() :: [
  font: String.t(),
  font_size: pos_integer(),
  dpi: pos_integer(),
  text_fill_color: Image.Color.t(),
  text_stroke_width: pos_integer(),
  font_weigtht: atom(),
  background_fill_color: Image.Color.t(),
  background_stroke_color: Image.Color.t(),
  background_stroke_width: pos_integer(),
  background_stroke_opacity: float(),
  background_fill_opacity: float(),
  padding: [non_neg_integer(), ...],
  letter_spacing: :normal | pos_integer(),
  x: :center | :left | :right | pos_integer(),
  y: :middle | :top | :bottom | pos_integer(),
  width: pos_integer() | nil,
  height: pos_integer() | nil,
  fontfile: String.t() | nil,
  align: :left | :right | :center,
  justify: boolean()
]

Functions

Link to this function

validate_options(options)

View Source

Validate the options for Image.Text.text/2.