Creating nice fonts in love

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.
User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Creating nice fonts in love

Post by silver_hawk »

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
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Creating nice fonts in love

Post by Lafolie »

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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Creating nice fonts in love

Post by Robin »

Lafolie wrote:I believe Robin's RichText library is pretty good at what I think you're looking for.
It has no support for shadows, blends and gradients, though.

To do that, you'd probably want to use stencils or something.
Help us help you: attach a .love.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Creating nice fonts in love

Post by T-Bone »

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.
User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Re: Creating nice fonts in love

Post by silver_hawk »

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 :D
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Creating nice fonts in love

Post by kikito »

I'd just create an image with gimp or photoshop.
When I write def I mean function.
User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Re: Creating nice fonts in love

Post by silver_hawk »

kikito wrote:I'd just create an image with gimp or photoshop.
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 these :)
But I think I might go with the text to sprite and then do some canvas manipulation :) but I don't have any experience with that kind of thing yet :)
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Creating nice fonts in love

Post by Inny »

You could use imagefonts: https://love2d.org/wiki/love.graphics.newImageFont and https://love2d.org/wiki/ImageFontFormat

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
They're pretty easy and gets the job done.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Creating nice fonts in love

Post by T-Bone »

Of course you should use image fonts! I actually forgot LÖVE had support for ttf :neko:

It's quite fun to make fonts, it doesn't take too much effort to get decent results :)
User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Re: Creating nice fonts in love

Post by silver_hawk »

Nice I must try the image fonts then :D

Is there an example .png anywhere, where I can get an idea on how do create one on my own? :D
Sounds like that the way to go :)

And ty all for the quick responses <3
Post Reply

Who is online

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