Font-crash

Posted By: hopfel

Font-crash - 11/10/10 21:01

Hi, I've got a little problem with creating a font.
I wrote this code in one of my functions:

Code:
my_txt.font = font_create("my_font.bmp"); //create a font with a Bitmap



This works fine, when I test it.
But after publish, if I run the exe, it crashes.

This one works:
Code:
my_txt.font = font_create("arial#8");


So the problem must be at this line.

But there isn't something wrong with the bitmap-file,
because in another included script I created a font the same way (and the same Bitmap), but there it works.
It's really only in this Scriptfile and only after publish.

Has someone an idea, what the fu** is going on here? o.0
Thanks. laugh
LG
Hopfel
Posted By: hopfel

Re: Font-crash - 11/14/10 12:46

Nobody an idea?
Do you need some more code maybe?
I really don't know where the fault could be...
Would be really nice if someone can help.
LG
Posted By: Pappenheimer

Re: Font-crash - 11/14/10 13:26

Is "my_font.bmp" included after publish?
Otherwise provide more code.
Posted By: hopfel

Re: Font-crash - 11/14/10 15:01

Jep, and I included some other scripts which load the same font,
and there it works. So the file itself cant be the problem...
Ok, this code crashes (I used the real names of the pointer etc.):

Code:
TEXT* feld_txt = txt_create(1,2); //Erstelle den Text für den Textfeldinhalt
feld_txt.flags=VISIBLE;
feld_txt.font=font_create("write_font.bmp");



This makes a crash after Publish, without this lines it works, except I write it in the one included Scriptfile. There it works fine.
Erm...
This is the whole project, it would be great if someone can take his time to have a look on it:
www.haeschen.ch/hopfel/Panelelemente.zip

If you open the script "main.c" and test it, it works.
But if you start the exe it crashes.

The lines are:
scrollbalken.c
Line 305
This lines makes a crash (you can replace my_scr.filename1 with "write_font.bmp" and it wouldn't work after publish also)

and
textfeld.c
Line 655
This lines doesnt make one, but it's the same Bitmap-file


© 2024 lite-C Forums