Fonts in LOVE (VERY big problem)

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.
luminarious
Prole
Posts: 1
Joined: Mon May 23, 2011 3:46 pm

Re: Fonts in LOVE (VERY big problem)

Post by luminarious »

I would add my humble vote to this discussion. Bitmap font support is important, because most professional font licences do not allow embedding. This makes bmfont the second easiest option for most purposes, and quite desirable if I'd like to make a game featuring plenty of text.

Also, common practise with bmfonts is to not scale them, I don't understand why this is even being discussed here? If you want different size, you make another version. Bmfont can even use ClearType for font rendering, so the quality is very good if the engine supports alpha transparency correctly.
User avatar
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by RPG »

I'm already thinking about writing my own engine to display fonts.
Below is a screenshot bitmap fonts with different sizes. If the font does not scale - it displays perfectly. When scaling down to 12 pixels - the font looks good. With increasing the font size by more than 50 pixels, it becomes blurry, but such a large font is not needed at all. For smaller fonts, I will use pre-generated fonts with needed size. Small fonts without anti-aliasing looks wery good (7pt, 8pt, up to 10 pt). For example, I'll need 7pt font to display text on mobile devices (PDA, iPhone), but in LOVE this font very blurry and slow.
The screenshot shows that artifacts appear with scaled font. They appear due to the fact that the letters are very close on texture. Will need to make margin of 1 pixel.
And for the small font scaling will not occur, so they will be very well packed in a single texture.

Texture:
Image

Result:
Image
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by Lafolie »

What is your point here? It has been stated already that scaling bitmap fonts isn't recommended.
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
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by RPG »

Scaled bitmap font looks good from 12pt up to 50pt
User avatar
ishkabible
Party member
Posts: 241
Joined: Sat Oct 23, 2010 7:34 pm
Location: Kansas USA

Re: Fonts in LOVE (VERY big problem)

Post by ishkabible »

i think that we have established that you like bitmaps fonts... well i like true type fonts...
User avatar
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by RPG »

You can't use ttf directly in Opengl: ttf font must be rasterised before.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by Jasoco »

I like image fonts because I like making my game as pseudo-16-bit.
User avatar
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by RPG »

Image

This program generates fonts I want to use. On this screenshot you see all sizes of font Arial (7pt - 13pt), that must be shown in game pixel-by-pixel (without scaling). Also this font contains very big font for scaling down and getting different font sizes more than 13pt.

Program uses compression techniques such as optimal rectangle placement (packing), merging similar glyphs, trimming images.

Size of compressed texture - 50kb. Less than ttf file.
edeferaxy
Prole
Posts: 1
Joined: Fri Jan 20, 2012 6:24 am

Re: Fonts in LOVE (VERY big problem)

Post by edeferaxy »

How do I change bitmap to jpeg? I need to know how to make my "bitmap" images into "jpeg", can someone please help?
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Fonts in LOVE (VERY big problem)

Post by Taehl »

edeferaxy wrote:How do I change bitmap to jpeg? I need to know how to make my "bitmap" images into "jpeg", can someone please help?
Trust me, .jpg is the last format you want to use in game development. In 99% of cases, I'd recommend .png. As for conversion, I personally do it in PSP9 or XnView since I already have and use them elsewhere. Google will provide thousands of others.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests