Font

Defines the shape of characters that can be drawn onto the screen.

Constructors

love.graphics.newFont Creates a new Font.
love.graphics.newImageFont Creates a new Font by loading a specifically formatted image. 0.2.0

Functions

Font:getAscent Gets the ascent of the Font in pixels. 0.9.0
Font:getBaseline Gets the baseline of the Font in pixels. 0.9.0
Font:getDescent Gets the descent of the Font in pixels. 0.9.0
Font:getFilter Gets the filter mode for a font. 0.9.0
Font:getHeight Gets the height of the Font in pixels.
Font:getLineHeight Gets the line height.
Font:getWidth Determines the horizontal size a line of text needs.
Font:getWrap Gets formatting information for text, given a wrap limit. 0.7.0
Font:hasGlyphs Gets whether the Font can render a character or string. 0.9.0
Font:setFallbacks Sets other Fonts to use if this Font doesn't have a specific character. 0.10.0
Font:setFilter Sets the filter mode for a font. 0.9.0
Font:setLineHeight Sets the line height.
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.

Supertypes

See Also


Font:getFilter
  • References/Game Development/LÖVE/love.graphics/Font

Font:getFilter Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the filter mode for a font.

2025-01-10 15:47:30
Font:setFilter
  • References/Game Development/LÖVE/love.graphics/Font

Font:setFilter Available since LÖVE 0.9.0 This function is not supported in earlier versions. Sets the filter mode for a font.

2025-01-10 15:47:30
Font:getHeight
  • References/Game Development/LÖVE/love.graphics/Font

Font:getHeight Gets the height of the Font. The height of the font is the size including any spacing; the height which it will need. Function Synopsis

2025-01-10 15:47:30
Font:getAscent
  • References/Game Development/LÖVE/love.graphics/Font

Font:getAscent Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the ascent of the Font. The ascent spans

2025-01-10 15:47:30
Font:getBaseline
  • References/Game Development/LÖVE/love.graphics/Font

Font:getBaseline Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the baseline of the Font. Most scripts

2025-01-10 15:47:30
Font:getWidth
  • References/Game Development/LÖVE/love.graphics/Font

Font:getWidth Determines the horizontal size a line of text needs. Does not support line-breaks. Function Synopsis

2025-01-10 15:47:30
Font:getDescent
  • References/Game Development/LÖVE/love.graphics/Font

Font:getDescent Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the descent of the Font. The descent spans

2025-01-10 15:47:30
Font:hasGlyphs
  • References/Game Development/LÖVE/love.graphics/Font

Font:hasGlyphs Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets whether the Font can render a character or

2025-01-10 15:47:30
Font:setFallbacks
  • References/Game Development/LÖVE/love.graphics/Font

Font:setFallbacks Available since LÖVE 0.10.0 This function is not supported in earlier versions. Sets the fallback fonts. When the Font doesn't

2025-01-10 15:47:30
Font:setLineHeight
  • References/Game Development/LÖVE/love.graphics/Font

Font:setLineHeight Sets the line height. When rendering the font in lines the actual height will be determined by the line height multiplied by the height of the font. The default is 1

2025-01-10 15:47:30