TrueType font Support by FreeType Library

A forum to store posts deemed exceptionally wise and useful

Postby Mancuso Raffaele » Sat Jul 15, 2006 2:04 pm

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)
User avatar
Mancuso Raffaele
 
Posts: 70
Joined: Sat Dec 17, 2005 4:43 pm
Location: licata (AG) italy

Postby jam » Sun Jul 16, 2006 12:31 am

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
jam
 
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Postby clovenhoof » Mon Jul 17, 2006 8:37 pm

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.
clovenhoof
 
Posts: 1
Joined: Sun Jul 16, 2006 9:39 pm

Postby CuteAlien » Mon Jul 17, 2006 9:22 pm

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.
User avatar
CuteAlien
Admin
 
Posts: 5364
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

hey darkliquid

Postby juliusctw » Tue Jul 18, 2006 1:25 pm

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
juliusctw
 
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am

Re: hey darkliquid

Postby CuteAlien » Tue Jul 18, 2006 1:38 pm

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.
User avatar
CuteAlien
Admin
 
Posts: 5364
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Postby CuteAlien » Tue Jul 18, 2006 10:35 pm

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.
User avatar
CuteAlien
Admin
 
Posts: 5364
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Postby michael520 » Wed Jul 26, 2006 8:57 am

this topic really help me a lot! I have to thank the author!
michael520
 
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

Postby alc » Thu Jul 27, 2006 6:24 pm

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

Postby alc » Thu Jul 27, 2006 6:26 pm

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).
alc
 
Posts: 31
Joined: Sun Jun 25, 2006 10:59 pm
Location: Denmark

Now with Java?

Postby Forexs » Fri Jul 28, 2006 9:28 pm

Is there any way to use this with Jirr?
Forexs
 
Posts: 5
Joined: Fri Jul 28, 2006 9:22 pm
Location: Denmark

..

Postby liteplayer » Mon Feb 05, 2007 5:40 am

Add code : in attach()

for()
{
....
Glyphs[i].cache = false;
Glyphs[i].image = NULL;
}
- LiTePlayer
liteplayer
 
Posts: 1
Joined: Mon Feb 05, 2007 5:34 am
Location: Korea

compile it ,4 errors

Postby wind19 » Sun Apr 08, 2007 4:36 am

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'
wind19
 
Posts: 4
Joined: Mon Jun 26, 2006 2:48 am

Postby hybrid » Sun Apr 08, 2007 12:44 pm

this enum has been renamed to EDT_DIRECT3D8
hybrid
Admin
 
Posts: 13947
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby psyberion » Mon Apr 09, 2007 12:31 am

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.
psyberion
 
Posts: 2
Joined: Mon Apr 09, 2007 12:16 am

PreviousNext

Return to FAQs, Tutorials, Howtos, and external tool lists

Who is online

Users browsing this forum: No registered users and 1 guest