Version 0.3.2
LÖVE Documentation
OverviewLicenseCreditsInstallingGetting started
Devices
love.graphicslove.audiolove.keyboardlove.mouselove.filesystemlove.timerlove.system
Types
AnimationColorFontFileImageMusicParticleSystemSound
Callbacks
loadupdatedrawmousepressedmousereleasedkeypressedkeyreleased
Miscellaneous
ConstantsConfig filesKeyboard shortcuts
Function
love.graphics.newImageFont( filename, glyphs )
An image font is created by having a series of characters set next to each other in a horizontal row. Between all the characters and on the left and right sides should be a dividing line consisting of a single color (which is not found in the actual characters themselves).
This example image is consiting of black and white glyphs on a transparent background where they are separated by yellow lines. The yellow will be used in determining where each character begins and ends.
Usage
love.graphics.newImageFont( filename, glyphs )
Arguments
filenameThe filepath to the image file.
glyphsA list of the characters as they are in the image.
Returns
FontA Font object containing the font data.
Examples
Example 1: Add the example font. example = love.graphics.newImageFont("imagefont.png", " ABCDEFGHIJKLMNOPQRSTUVWXYZ")