Has anybody some experience with fonts in love? how to create neat fonts using the inbuilt font system, rather than drawing each font?
effects like shadows, blends, gradients and so on?
I would really like some advice on this point, and maybe we could share some examples?
Have a nice day <3
Creating nice fonts in love
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Creating nice fonts in love
It almost sounds as if you are confusing fonts with implementations of the font API. I believe Robin's RichText library is pretty good at what I think you're looking for.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Creating nice fonts in love
It has no support for shadows, blends and gradients, though.Lafolie wrote:I believe Robin's RichText library is pretty good at what I think you're looking for.
To do that, you'd probably want to use stencils or something.
Help us help you: attach a .love.
Re: Creating nice fonts in love
It's probably just easier to render a normal font to a Frameb- I mean Canvas, and then applying various effects and stuff to it.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- silver_hawk
- Prole
- Posts: 36
- Joined: Mon Feb 27, 2012 2:19 pm
Re: Creating nice fonts in love
Nice i will try both, but what do you normally do when you want some nice style text ingame? Do you use a nice font, or a library for creating nice text via. sprites? Just curious 

- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Creating nice fonts in love
I'd just create an image with gimp or photoshop.
When I write def I mean function.
- silver_hawk
- Prole
- Posts: 36
- Joined: Mon Feb 27, 2012 2:19 pm
Re: Creating nice fonts in love
Ye but the thing is, I have to do quite a lot based on strings, rather that some hard coded ones, so it would be nice with some effects on thesekikito wrote:I'd just create an image with gimp or photoshop.

But I think I might go with the text to sprite and then do some canvas manipulation


Re: Creating nice fonts in love
You could use imagefonts: https://love2d.org/wiki/love.graphics.newImageFont and https://love2d.org/wiki/ImageFontFormat
They're pretty easy and gets the job done.
Code: Select all
do
local fontset =
[=[ ABCDEFGHIJKLMNOPQRSTUVWXYZ]=] ..
[=[abcdefghijklmnopqrstuvwxyz]=] ..
[=[0123456789]=] ..
[=["?!.,'~^#@$*&+-=\/|:;()[]{}_`<>%]=]
function loadImageFont(name)
local fontimg = love.graphics.newImage(name)
local fontimg:setFilter("nearest", "nearest")
local font = love.graphics.newImageFont(fontimg, fontset)
local fontHeight = fontimg:getHeight()
local font:setLineHeight( fontHeight )
love.graphics.setFont(font)
end
end
Re: Creating nice fonts in love
Of course you should use image fonts! I actually forgot LÖVE had support for ttf 
It's quite fun to make fonts, it doesn't take too much effort to get decent results

It's quite fun to make fonts, it doesn't take too much effort to get decent results

My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- silver_hawk
- Prole
- Posts: 36
- Joined: Mon Feb 27, 2012 2:19 pm
Re: Creating nice fonts in love
Nice I must try the image fonts then 
Is there an example .png anywhere, where I can get an idea on how do create one on my own?
Sounds like that the way to go
And ty all for the quick responses <3

Is there an example .png anywhere, where I can get an idea on how do create one on my own?

Sounds like that the way to go

And ty all for the quick responses <3
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 2 guests