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

Options for text drawing.

Summary

Types

@type t() :: [
  font: String.t(),
  font_size: pos_integer(),
  text_fill_color: Image.Color.t(),
  text_stroke_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 | integer(),
  x: :center | :left | :right,
  y: :middle | :top | :bottom,
  autofit: boolean(),
  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.