Text Effects

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Cardibro123
Prole
Posts: 7
Joined: Sun Jan 21, 2024 3:21 pm

Text Effects

Post by Cardibro123 »

I have been playing some Balatro lately, a game made in Love2D, and I was wondering how you would edit the size, rotation, or position of individual characters when printing text. Here is an example:
Screenshot 2025-03-13 191926.png
Screenshot 2025-03-13 191926.png (28.85 KiB) Viewed 234 times
If anyone could help me, that would be amazing! :megagrin:
loofy2
Prole
Posts: 8
Joined: Fri Mar 14, 2025 1:11 am

Re: Text Effects

Post by loofy2 »

break the characters into a table and iterate over the ipairs

something like this (off the top of my head)

```
local width_of_container

for index, character in ipairs(string) do
love.graphics.setFont(font)
local x = text:getwidth(
love.graphics.translate(x,0)
love.graphics.rotate(...)
done
```
User avatar
darkfrei
Party member
Posts: 1244
Joined: Sat Feb 08, 2020 11:09 pm

Re: Text Effects

Post by darkfrei »

Something lice coloredText, by with fonts?

https://love2d.org/wiki/love.graphics.print
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
marclurr
Party member
Posts: 162
Joined: Fri Apr 22, 2022 9:25 am

Re: Text Effects

Post by marclurr »

You could always unzip the exe and see how they did it.
Ross
Party member
Posts: 101
Joined: Tue Mar 13, 2018 12:12 pm
Contact:

Re: Text Effects

Post by Ross »

It's pretty much as you said it, there's no more to it than that: You draw each character with the size, rotation, and position that you want.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests