FontMetrics.shorten

You're seeing just the function shorten, go back to FontMetrics module for more information.
Link to this function

shorten(source, max_width, pixels, font_metrics, opts \\ [])

View Source

Specs

shorten(
  String.t() | [integer()],
  max_width :: number(),
  pixels :: number(),
  metrics :: t(),
  opts :: Keyword.t()
) :: String.t() | [integer()]

Shorten a string to fit a given width

Options

Supported options:

  • :kern - The default value is false.

  • :terminator - The default value is "…".

returns string