Font

constructor(resourcePath: String, letterSpacing: Float = 0.0f, lineSpacing: Float = 1.4f, family: FontFamily? = null, italic: Boolean = resourcePath.contains("italic", ignoreCase = true), weight: Font.Weight = Weight.entries.getByName(resourcePath.findLastAnyOf(Weight.entries.names(), ignoreCase = true)?.second) ?: Weight.Regular)

Parameters

resourcePath

The resource of the font, can be a URL (see here, you should use this or an equivalent method)

letterSpacing

The letter spacing of the font, in pixels (e.g. 1 pixel = 1 empty pixel between each letter).

lineSpacing

The line spacing of the font, in proportion to the font size (e.g. 2 means 1 empty line between each line, 1.5 = half a line between...)

family

a reference to the family that encloses this font. Only set if this font was retrieved from a method like FontFamily.get or similar.