Tincture.Typography.RichText.Word (Tincture v0.1.0)

Copy Markdown View Source

A single word token, carrying the width it measured to in its run's font.

measured? is false when the font could not be resolved at the time the token was built — the width is then a rough estimate from the point size. An embedded font is unresolvable until the document is known, so this is normal for text built ahead of layout; RichText.remeasure/2 resolves it.

Summary

Types

t()

@type t() :: %Tincture.Typography.RichText.Word{
  font: String.t(),
  measured?: boolean(),
  size: number(),
  style: atom() | nil,
  text: String.t(),
  width: number()
}