Font:getKerning

Available since LÖVE 11.4
This function is not supported in earlier versions.

Gets the kerning between two characters in the Font.

Kerning is normally handled automatically in love.graphics.print, Text objects, Font:getWidth, Font:getWrap, etc. This function is useful when stitching text together manually.

Function

Synopsis

kerning = Font:getKerning( leftchar, rightchar )

Arguments

string leftchar
The left character.
string rightchar
The right character.

Returns

number kerning
The kerning amount to add to the spacing between the two characters. May be negative.

Function

Synopsis

kerning = Font:getKerning( leftglyph, rightglyph )

Arguments

number leftglyph
The unicode number for the left glyph.
number rightglyph
The unicode number for the right glyph.

Returns

number kerning
The kerning amount to add to the spacing between the two glyphs. May be negative.

See Also

Other Languages