# `Minga.Core.WidthOracle`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/core/width_oracle.ex#L1)

Measures display width for wrap computation.

The render pipeline passes an oracle value into `Minga.Core.WrapMap` so wrap decisions can stay BEAM-owned while the measurement strategy varies by frontend. The safe production oracle is monospace. Measured oracles are opt-in and only make sense when the caller owns the cache.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `display_width`

```elixir
@spec display_width(t(), String.t()) :: non_neg_integer()
```

Returns the display width of a text string.

# `fingerprint`

```elixir
@spec fingerprint(t()) :: term()
```

Returns a compact fingerprint that changes when wrapped text measurement changes.

# `grapheme_width`

```elixir
@spec grapheme_width(t(), String.t()) :: non_neg_integer()
```

Returns the display width of a single grapheme.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
