1. Anders Ruud
  2. love

Issues

Issue #56 resolved

Printing newlines changes when print call has scaling parameters

Anonymous created an issue

This program displays the same text three times. The first and third times have the newline work as an actual newline and the output is two lines of text. In the middle call with the extra parameters, the newline becomes a box character, and it prints everything on the same line.

{{{

!lua

text = "This is the first line\nAnd this is the second"

function love.draw() love.graphics.print(text, 30, 30) love.graphics.print(text, 30, 130, 0, 2, 2) love.graphics.scale(2) love.graphics.print(text, 30/2, 230/2) end

}}}

Comments (9)

  1. Matthias Richter

    It's intentional: in both cases (print(str, x,y,angle) and print(str, x,y, angle, scale)) it just forwards to the specialized print(str, x,y,angle, sx,sy), which includes the check.

    The extra argument float oy in both Font.hpp and Font.cpp is unintentionally left in though and should be removed...

  2. Log in to comment