FreeType and FTGL?

I’m curious with the addition of DevIL to LWJGL if there are folks here that are interested in possible bindings to FreeType and FTGL for font support.

www.freetype.org/
http://homepages.paradise.net.nz/henryj/code/index.html#FTGL

These two projects seem to be used widely.

Seems rather more application oriented than gaming? - since games typically just use a bitmap font (which usually works fine).
I have some stuff in my head about what needs to be in the lwjgl distribution and what the lwjgl project is becomming - I’ll try and write it down tonight and post it to the boards, since it relates to adding more bindings.

Indeed… This pair does support bitmap font rendering and more, but you can simply access a large number of already existing font file types rather than having to deal with a particular custom bitmap format. It also handles antialiasing and other useful features. One such feature is making bitmaps for particular sizes on the fly from TrueType fonts. That seems very useful for games and of course apps.

…except I tried using FreeType a while ago and the font rendering quality was so abysmal next to Java2D I ditched it after many days fruitless tweaking.

Java2D font rendering truly is sublime! All it really needs now is subpixel rendering.

Cas :slight_smile:

One such feature is making bitmaps for particular sizes on
the fly from TrueType fonts.

Which means you need to redistribute the ttf file and that’s really expensive.

The default fonts are too boring and public domain fonts are pretty rare.

So… uhm… bitmap fonts for me.

I haven’t used it yet, just read all the info on the web sites.

Did you use version 1.x or 2?

From the screenshots they offer of v2 it seems quite capable in regard to antialiased font support.

Looking over the docs there also seems to be support for creating bitmaps suitable for sub pixel rendering.
See FT_RENDER_MODE_LCD
http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Mode

I’ll be looking to check these two libraries out soon though…

[quote]>One such feature is making bitmaps for particular sizes on

the fly from TrueType fonts.
Which means you need to redistribute the ttf file and that’s really expensive.
The default fonts are too boring and public domain fonts are pretty rare.
So… uhm… bitmap fonts for me.
[/quote]
I’m not following on the redistribution of ttf files being expensive angle. They are small in file size, plus are nice because they are self contained in a single file. Also punching in “truetype free” in google leads to plenty of public domain fonts. And plenty that are available for a small fee.

Bitmap fonts need the image and a separate file explaining the spacing; plus are locked to one size.

May I ask where you get all your bitmap fonts from?

I just have scrounged up some from what others have posted around here…

I’m not following on the redistribution of ttf files being
expensive angle. They are small in file size, plus are nice
because they are self contained in a single file. Also
punching in “truetype free” in google leads to plenty of
public domain fonts. And plenty that are available for a
small fee.

Yea, there are lot’s of “free” fonts. The devil is in the detail - the license. You can also buy high quality commercial fonts for 20-80 bucks, but… redistribution of the ttf isn’t allowed.

May I ask where you get all your bitmap fonts from?

We generate em from public domain, free or commercial fonts with tools like bitmap font builder or selfwritten tools. Redistribution of those textures (typeface) is perfectly legal otherwise you couldn’t do anything with a font.

Thanks for the BFB tip… :slight_smile:

Yeah… I can see the pain in license issues and the capability to load various font formats could be argued as a non-essential feature for game development.

The frameworks I am releasing are suitable for game engine development or general multimedia apps, so supporting all sorts of fonts is a line item in my mid range dev path.

However, if the functionality was available .and. it was simpler to use than straight up bitmap fonts then I believe devs will use it. Particularly if a nice rendering package is built around FreeType and FTGL that does allow sub pixel rendering and stuff like that without the dev having to code it.

A library of license friendly fonts could also be created.

So, yeah… I’m approaching things from a middleware / tools perspective and not raw “only what is needed” game dev which is closer to the path of LWJGL.

What I see a big problem with app centric bitmap fonts, is (almost) unable to support international letters and special characters. Look at the Arial font with Character Map, or newer windows even has unicode Arial. Single font gives you western, cyrillic, arab, hebrew and so on…

I solved that by simply rendering every glyph in the font. There are thousands of them!

Cas :slight_smile:

Did anyone tried to create a 3D model from glyph with help of Java2D?

While we are at the discusion about a nasty isues with fonts, what about some links on favorite PD, or BSD fonts.

[quote]While we are at the discusion about a nasty isues with fonts, what about some links on favorite PD, or BSD fonts.
[/quote]
Well, there are so many fonts… My favourite is Verdana :slight_smile: