vivid v0.4.2 Vivid.Font.Char View Source
Describes an individual character defined by a Hershey font file.
Link to this section Summary
Functions
Returns the left padding specified for this character
Rendered height of a character
Rendered width of a character
Returns the right padding specified for this 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
Link to this section Types
Link to this section Functions
left_pad(Vivid.Font.Char.t, number) :: number
Returns the left padding specified for this character.
rendered_height(Vivid.Font.Char.t, number) :: number
Rendered height of a character.
rendered_width(Vivid.Font.Char.t, number) :: number
Rendered width of a character.
right_pad(Vivid.Font.Char.t, number) :: number
Returns the right padding specified for this character.
to_shape(Vivid.Font.Char.t, Vivid.Point.t, number) :: Shape.t
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(Vivid.Font.Char.t, number) :: number
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.