Skip to content

Commit 2e6e477

Browse files
TakWolfftsf
authored andcommitted
fix lineHeight scale
1 parent b70adf5 commit 2e6e477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nico.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,7 @@ proc print*(text: string, x,y: Pint, scale: Pint = 1) =
22492249
var x = x
22502250
var y = y
22512251
let ix = x
2252-
let lineHeight = fontHeight() + scale
2252+
let lineHeight = fontHeight() * scale + scale
22532253
for line in text.splitLines:
22542254
for c in line.runes:
22552255
x += glyph(c, x, y, scale)
@@ -2262,7 +2262,7 @@ proc print*(text: string, scale: Pint = 1) =
22622262
raise newException(Exception, "No font selected")
22632263
var x = cursorX
22642264
let y = cursorY
2265-
let lineHeight = fontHeight() + scale
2265+
let lineHeight = fontHeight() * scale + scale
22662266
for c in text.runes:
22672267
x += glyph(c, x, y, scale)
22682268
cursorY += lineHeight

0 commit comments

Comments
 (0)