vivid v0.2.1 Vivid.Font.Char

Summary

Functions

Rendered height of a character

Rendered width of a character

Convert a %Char{} into a shape which can be rendered

Returns the (documented) width of a specific character. This is not the maximum width of the character, as some go beyond or don’t reach their documented bounds. I assume this is for kerning. I may be wrong

Functions

left_pad(char, scale \\ 1.0)
rendered_height(char, scale \\ 1.0)

Rendered height of a character.

rendered_width(char, scale \\ 1.0)

Rendered width of a character.

right_pad(char, scale \\ 1.0)
to_shape(char, center, scale \\ 1.0)

Convert a %Char{} into a shape which can be rendered.

  • char is a %Char{} struct.
  • center the center %Point{} around which to render the character.
  • scale how much to scale the character by.
width(char, scale \\ 1.0)

Returns the (documented) width of a specific character. This is not the maximum width of the character, as some go beyond or don’t reach their documented bounds. I assume this is for kerning. I may be wrong.