FontMetrics.nearest_gap

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

nearest_gap(source, pos, pixels, font_metrics, opts \\ [])

View Source

Specs

nearest_gap(
  String.t() | [integer()],
  pos :: {number(), number()},
  pixels :: number(),
  metrics :: t(),
  opts :: Keyword.t()
) ::
  {character_number :: integer(), x_position :: number(),
   line_number :: integer()}

Find the gap between to characters given an {x,y} coordinate

Options

Supported options:

  • :kern - The default value is false.

  • :wrap - The default value is :word.

  • :line_height

returns {character_number, x_position, line_number}