TrueType font Support by FreeType Library

A forum to store posts deemed exceptionally wise and useful
Mancuso Raffaele
Posts: 70
Joined: Sat Dec 17, 2005 4:43 pm
Location: licata (AG) italy
Contact:

Post by Mancuso Raffaele »

i try to decompress it with winrar,winzip and windows "compressed folder". The result is the same, file corrupted :(
Bye all,
Mancuso Raffaele (Ares FPS game)
jam
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Post by jam »

The link is working for me, but I went ahead and recompressed the archive as a 7-Zip SFX file and uploaded it to rapidshare.

http://rapidshare.de/files/25954965/irr ... e.exe.html
system-independent, adj.:
Works equally poorly on all systems.
-- unknown
clovenhoof
Posts: 1
Joined: Sun Jul 16, 2006 9:39 pm

Post by clovenhoof »

file is definitely not corrupted... but anyhow,

i'm pulling my hair out with this one, since it's kind of damn lots of manual labor to supply bitmaps for every single font needed, i started out trying to get a working build with this handy piece of code. (respect to zgock)

but, the problem is i'm putting it together with vc++ 2003, and i created every single different build of freetype possible and tested with them... the demo compiles and links nicely without any errors - then bam. When launching the recompiled demo with freetype 221 it crashes at the first (and only?) pass to Glyphs.reallocate in CGUITTFont.cpp.

The same thing happens when I compile it with my own code.

As I saw there's some of you here that have succeeded in putting it together, and I figured it has something to do with whichever builds you're putting together, any help would be appreciated.
CuteAlien
Admin
Posts: 9633
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Hm, i put the way i was using it up on a page (http://www.michaelzeilfelder.de/irrlicht.htm). I also used freetype 2.2.1. so that's not the problem. But i have no VS so i only tested it on linux and mingw. I'm not sure anymore if i had changed something in the CGUITTFont files, but i think not. So basicly i can only give you an additional wrapper which i put around the CGUITTFont files, which takes care of the memory management when loading files.
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

hey darkliquid

Post by juliusctw »

hey dark liquid

do you mind tar and send me your source code if you get it working, i use linux too :wink:

sorry for my ignorance, :oops: i tried to do my own research about true type font, i guess it allows your to put Unicode fonts on the screen, does this mean we can put chinese, arabic, etc characters on the screen including japanese?

i guess, i just don't get it ,, , what's so special about having true type font ?

thanks for clearifying
CuteAlien
Admin
Posts: 9633
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: hey darkliquid

Post by CuteAlien »

juliusctw wrote: sorry for my ignorance, :oops: i tried to do my own research about true type font, i guess it allows your to put Unicode fonts on the screen, does this mean we can put chinese, arabic, etc characters on the screen including japanese?
Yep.
juliusctw wrote: i guess, i just don't get it ,, , what's so special about having true type font ?
TTF's are vector graphics, so they can be scaled to any size without losing quality.
CuteAlien
Admin
Posts: 9633
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I guess i just found some bugs in the ttf code.
CGUITTGlyph is used in an array, has no copy-constructor defined and works with dynamic memory. It crashed therefore sometimes in the destructor. I changed it for now, by using pointers to CGUITTGlyph in the array. Also the image created where not droped. I put the updated Version on my page.
michael520
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

Post by michael520 »

this topic really help me a lot! I have to thank the author!
alc
Posts: 31
Joined: Sun Jun 25, 2006 10:59 pm
Location: Denmark

Post by alc »

I've just tried using the TrueType package, but I cannot make it work. That is to say, the demo works fine (compiles without problems), but when included in my project, it crashes. I've tried FT 2.1.9 and 2.2.1. Same result.

I am using my own compiled ft219 (or ft221) lib file, as I get numerous warnings and a subsequent crash with the lib file accompanying the demo. Now when the app runs it displays the font nicely (I'm using the Ariel font as in the demo), but after a few lines of code after the setFont function, it crashes in ftobjs.c (i.e. in the FreeType code)?!

Anybody seen this before? BTW I'm using C++ in VS 8.0.
Last edited by alc on Thu Jul 27, 2006 6:28 pm, edited 1 time in total.
alc
Posts: 31
Joined: Sun Jun 25, 2006 10:59 pm
Location: Denmark

Post by alc »

clovenhoof wrote:When launching the recompiled demo with freetype 221 it crashes at the first (and only?) pass to Glyphs.reallocate in CGUITTFont.cpp.
Had the same problem, but solved it by compiling my own .lib file from the FreeType source code. However, I then had a new problem (see above post).
Forexs
Posts: 5
Joined: Fri Jul 28, 2006 9:22 pm
Location: Denmark
Contact:

Now with Java?

Post by Forexs »

Is there any way to use this with Jirr?
liteplayer
Posts: 1
Joined: Mon Feb 05, 2007 5:34 am
Location: Korea

..

Post by liteplayer »

Add code : in attach()

for()
{
....
Glyphs.cache = false;
Glyphs.image = NULL;
}
- LiTePlayer
wind19
Posts: 4
Joined: Mon Jun 26, 2006 2:48 am

compile it ,4 errors

Post by wind19 »

I download the demo,and when i compiling it with vc6.0,and using irrlicht-1.3 ,appear 2 errors,like that
error C2259: 'CGUITTFont' : cannot instantiate abstract class due to following members:
error C2039: 'EDT_DIRECTX8' : is not a member of 'video'
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

this enum has been renamed to EDT_DIRECT3D8
psyberion
Posts: 2
Joined: Mon Apr 09, 2007 12:16 am

Post by psyberion »

I'm just trying to compile the demo with DEV-CPP and I get the following errors:

main.cpp:210: error: cannot allocate an object of type 'irr::gui::CGUITTFont'
main.cpp:210: error: because the following virtual functions are abstract:
C:/irrlicht-1.3/include/IGUIFont.h:76: error: virtual void irr::gui::IGUIFont::setKerningWidth(irr::s32)
C:/irrlicht-1.3/include/IGUIFont.h:77: error: virtual void irr::gui::IGUIFont::setKerningHeight(irr::s32)
C:/irrlicht-1.3/include/IGUIFont.h:88: error: virtual irr::s32 irr::gui::IGUIFont::getKerningWidth(const wchar_t*, const wchar_t*)
C:/irrlicht-1.3/include/IGUIFont.h:91: error: virtual irr::s32 irr::gui::IGUIFont::getKerningHeight()

Does anyone know why these errors could be occurring and how I may fix them?

Any help would be much appreciated.
Post Reply