Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Why Can't I Find Bitmap Fonts?  (Read 1958 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles

JGO Wizard


Medals: 67
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Posted 2013-10-26 19:30:24 »

So, I am adding in Fonts to my engine, and need to load some fonts. I was going to load some TrueTypeFonts, but that went ugly fast, so I want to take a simpler approach.

A simple google search of "bitmap fonts" gave me this image:
Click to Play


And since this is pretty easy to decode (you just loop through each row and write it to a texture), I want to start with this. But when I tried to find bitmap fonts, they were scarce, and only found on google images.

So when I did find a few downloads, they just gave me some .ttf's instead of images! I tried opening .ttf with image editors, and it was incompatible, so it is not just the extension that is different.

So where are these 'bitmap fonts,' or am I not searching hard enough?

Offline Simn
« Reply #1 - Posted 2013-10-26 19:35:29 »

Look at TheCodingUniverse's video here. He uses a tool called F2IBuilder for generating the image containing the font.

- Simn
Offline kpars

JGO Wizard


Medals: 97
Projects: 4
Exp: 3 years


Extreme Typist.


« Reply #2 - Posted 2013-10-26 19:36:33 »

BMFont. Get it.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline wessles

JGO Wizard


Medals: 67
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #3 - Posted 2013-10-26 19:48:58 »

I see...
I was hoping that online repositories would actually just give you some bitmap font images, not TrueTypeFont.
I am a little disappointed that I need to use a tool like this for it, but easy come easy go...

Offline Abuse

JGO Knight


Medals: 13


falling into the abyss of reality


« Reply #4 - Posted 2013-10-26 20:48:35 »

Look at TheCodingUniverse's video here. He uses a tool called F2IBuilder for generating the image containing the font.

Strange he goes into so much detail regarding trivial implementation details, yet completely fails to discuss fixed pitch vs proportional fonts, along with the bare minimum informational requirements of kerning, baseline, and height.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline pjt33
« Reply #5 - Posted 2013-10-26 20:53:18 »

Bitmap fonts don't scale, so outside specialised use cases they're pretty much dead. We happen to have one of those specialised use cases.

OpenGameArt has a few bitmap fonts: http://opengameart.org/art-search-advanced?field_art_tags_tid=font , but in general you'll need to find a font which you can use (note that Germany has particularly strong IP protection for typefaces) and either render it yourself or use a library which handles anti-aliasing, kerning, etc.
Offline wessles

JGO Wizard


Medals: 67
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #6 - Posted 2013-10-26 21:13:41 »

Okay... Or you could use the tool that converts it to bitmap fonts?
Taking baby steps here, since True Type Fonts are really difficult to load (or at least for me  Tongue).
I will implement that soon though.

Thanks for all the help!

Offline Simn
« Reply #7 - Posted 2013-10-26 21:18:09 »

Strange he goes into so much detail regarding trivial implementation details, yet completely fails to discuss fixed pitch vs proportional fonts, along with the bare minimum informational requirements of kerning, baseline, and height.

I know, I guess it was kinda misleading to refer to that video for just showing the F2IBuilder. Tongue

- Simn
Offline zngga
« Reply #8 - Posted 2013-10-26 22:02:17 »

I made a pretty good Font Loader that creates bitmap fonts from True Type Font files, and the built in Java Fonts. It is part of my home-brew game engine, GenesisEngine, and you can find the related files here, and here. If you are interested.

My code never has bugs... it just develops unexpected features!
Offline pjt33
« Reply #9 - Posted 2013-10-26 22:04:37 »

Okay... Or you could use the tool that converts it to bitmap fonts?
You've still got to render them. Take a look at this older thread to see some of the subtleties involved: http://www.java-gaming.org/topics/fontpacker-pack-truetype-fonts-into-your-game/30219/view.html
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Reply #10 - Posted 2013-11-16 21:57:51 »

I made a pretty good Font Loader that creates bitmap fonts from True Type Font files, and the built in Java Fonts. It is part of my home-brew game engine, GenesisEngine, and you can find the related files here, and here. If you are interested.

I do a similar thing in my game engine, I use something else to get a little more detail for slightly nicer looking fonts (more detailed advance and what not):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
Font font = ....
FontRenderContext context = new FontRenderContext( new AffineTransform(), true, true );
GlyphVector gv = font.createGlyphVector( context, new char[] { c } );
Rectangle2D visual = gv.getVisualBounds();
Rectangle2D logical = gv.getLogicalBounds();

if (logical.getWidth() > 0)
{
   Glyph g = new Glyph( new Tile(), (float)logical.getWidth(),
      (float)visual.getMinX(), (float)visual.getMinY(),
      (float)visual.getMaxX() + 1, (float)visual.getMaxY() + 1 );
   glyphs[c] = g;
}

Offline xsvenson
« Reply #11 - Posted 2013-11-18 16:04:06 »

As it has already been said, specialized usecase.

https://code.google.com/p/libgdx/wiki/Hiero, used to come with Slick (still does I think) but also included in Libgdx. Comes with some effects, easy to add Your own (java2d) and Angelcode is supported both frameworks. In case You use any of those, then it's win:win.

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Offline wessles

JGO Wizard


Medals: 67
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #12 - Posted 2013-11-28 04:10:30 »

Welp, I finished rendering TrueTypeFonts, and now am wondering if I should bother with Bitmap fonts. They just seem inefficient and limiting...

Offline opiop65

JGO Kernel


Medals: 156
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #13 - Posted 2013-11-28 04:13:13 »

Bitmap fonts have the advantage of being easy to set up, but they lose scalability and seem to be a little buggy at times.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (44 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (38 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (86 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!