love.graphics.printf
Draws formatted text, with word wrap and alignment.

See additional notes in love.graphics.print.

The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change.

In version 0.9.2 and earlier, wrapping was implemented by breaking up words by spaces and putting them back together to make sure things fit nicely within the limit provided. However, due to the way this is done, extra spaces between words would end up missing when printed on the screen, and some lines could overflow past the provided wrap limit. In version 0.10.0 and newer this is no longer the case.

In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
love.graphics.printf( text, x, y, limit, align, r, sx, sy, ox, oy, kx, ky )
text string A text string.
x number The position on the x-axis.
y number The position on the y-axis.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.printf( text, font, x, y, limit, align, r, sx, sy, ox, oy, kx, ky )
text string A text string.
font Font The Font object to use.
x number The position on the x-axis.
y number The position on the y-axis.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.printf( text, transform, limit, align )
text string A text string.
transform Transform Transformation object.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.
love.graphics.printf( text, font, transform, limit, align )
text string A text string.
font Font The Font object to use.
transform Transform Transformation object.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.
love.graphics.printf( coloredtext, x, y, limit, align, angle, sx, sy, ox, oy, kx, ky )
coloredtext table A table containing colors and strings to add to the object, in the form of {color1, string1, color2, string2, ...}.
coloredtext.color1 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string1 string A string of text which has a color specified by the previous color.
coloredtext.color2 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string2 string A string of text which has a color specified by the previous color.
coloredtext.... tables and strings Additional colors and strings.
x number The position of the text (x-axis).
y number The position of the text (y-axis).
limit number The maximum width in pixels of the text before it gets automatically wrapped to a new line.
align AlignMode The alignment of the text.
angle (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing / skew factor (x-axis).
ky (0) number Shearing / skew factor (y-axis).
love.graphics.printf( coloredtext, font, x, y, limit, align, angle, sx, sy, ox, oy, kx, ky )
coloredtext table A table containing colors and strings to add to the object, in the form of {color1, string1, color2, string2, ...}.
coloredtext.color1 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string1 string A string of text which has a color specified by the previous color.
coloredtext.color2 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string2 string A string of text which has a color specified by the previous color.
coloredtext.... tables and strings Additional colors and strings.
font Font The Font object to use.
x number The position on the x-axis.
y number The position on the y-axis.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.
angle (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.printf( coloredtext, transform, limit, align )
coloredtext table A table containing colors and strings to add to the object, in the form of {color1, string1, color2, string2, ...}.
coloredtext.color1 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string1 string A string of text which has a color specified by the previous color.
coloredtext.color2 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string2 string A string of text which has a color specified by the previous color.
coloredtext.... tables and strings Additional colors and strings.
transform Transform Transformation object.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.
love.graphics.printf( coloredtext, font, transform, limit, align )
coloredtext table A table containing colors and strings to add to the object, in the form of {color1, string1, color2, string2, ...}.
coloredtext.color1 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string1 string A string of text which has a color specified by the previous color.
coloredtext.color2 table A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
coloredtext.string2 string A string of text which has a color specified by the previous color.
coloredtext.... tables and strings Additional colors and strings.
font Font The Font object to use.
transform Transform Transformation object.
limit number Wrap the line after this many horizontal pixels.
align ('left') AlignMode The alignment.