Image.Options.Text (image v0.73.0)

Copy Markdown View Source

Options for text drawing.

Summary

Types

t()

@type t() :: [
  font: String.t(),
  font_size: non_neg_integer(),
  dpi: non_neg_integer(),
  text_fill_color: Image.Pixel.t() | :markup,
  text_stroke_width: pos_integer(),
  font_weight: atom(),
  background_fill_color: Image.Pixel.t(),
  background_stroke_color: Image.Pixel.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 | non_neg_integer(),
  y: :middle | :top | :bottom | non_neg_integer(),
  width: non_neg_integer() | nil,
  height: non_neg_integer() | nil,
  fontfile: String.t() | nil,
  align: :left | :right | :center,
  justify: boolean()
]

Functions

default_options()

validate_options(options)

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