Page 4 of 4

Re: Fonts in LOVE (VERY big problem)

Posted: Mon May 23, 2011 6:31 pm
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.

Re: Fonts in LOVE (VERY big problem)

Posted: Thu May 26, 2011 7:24 pm
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

Re: Fonts in LOVE (VERY big problem)

Posted: Thu May 26, 2011 7:49 pm
by Lafolie
What is your point here? It has been stated already that scaling bitmap fonts isn't recommended.

Re: Fonts in LOVE (VERY big problem)

Posted: Thu May 26, 2011 8:05 pm
by RPG
Scaled bitmap font looks good from 12pt up to 50pt

Re: Fonts in LOVE (VERY big problem)

Posted: Sat May 28, 2011 3:59 am
by ishkabible
i think that we have established that you like bitmaps fonts... well i like true type fonts...

Re: Fonts in LOVE (VERY big problem)

Posted: Sat May 28, 2011 10:12 am
by RPG
You can't use ttf directly in Opengl: ttf font must be rasterised before.

Re: Fonts in LOVE (VERY big problem)

Posted: Sat May 28, 2011 8:49 pm
by Jasoco
I like image fonts because I like making my game as pseudo-16-bit.

Re: Fonts in LOVE (VERY big problem)

Posted: Sun May 29, 2011 7:58 pm
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.

Re: Fonts in LOVE (VERY big problem)

Posted: Fri Jan 20, 2012 10:48 am
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?

Re: Fonts in LOVE (VERY big problem)

Posted: Thu Jan 26, 2012 6:24 am
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.