liaojifang wrote: > I have found that If I delete free(fnt)(Fl_x.cxx:fl_set_spot()),It didn't > have crashes . > > as follows: > > #if USE_XFT > #warning XFT support here > fnt = NULL;//fl_get_font_xfld(font, size); > if (!fnt) fnt = "-misc-fixed-*"; > fs = XCreateFontSet(fl_display, fnt, &missing_list, > &missing_count, &def_string); > //free(fnt); > #else > fnt = fl_get_font_xfld(font, size); > if (!fnt) fnt = "-misc-fixed-*"; > fs = XCreateFontSet(fl_display, fnt, &missing_list, > &missing_count, &def_string); > free(fnt); > #endif
Thanks liao, this is a bug because when setting fnt to a static constant string, fnt should _not_ be released not only where you modified it but also in the else code for non xft use... I'll have a look in my ubuntu setup to fix that. > > another question, I cross compile FLTK, and download a program to my target > machine, the chinese font can't display instead of "??",should I download > some font too? > There have been some previous discussion discussing about this in the development forum (i think) not so long ago, I remember that greg gave some hints ... Fabien _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

