[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
segfault creating font from .fnt file
From: Junior ####@####.#### Date: 11 Jun 2007 22:47:03 +0100 Message-Id: <A45FD221D0E.00000507ejr@inbox.com> Hi, I haven't been able to successfully load a bdf file agter converting it on .fnt file. I tried the t1demo and also get a segfault with it. Has anyone ran into this problem? Is loading .fnt file working? #################################################################### # native .fnt loadable font support #################################################################### HAVE_FNT_SUPPORT = Y HAVE_FNTGZ_SUPPORT = N FNT_FONT_DIR = "fonts/bdf" and FNTNAME "/fonts/bdf/font.fnt" Thanks. ____________________________________________________________ ONE-CLICK WEBMAIL ACCESS - Easily monitor & access your email accounts! Visit http://www.inbox.com/notifier and check it out! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] segfault creating font from .fnt file
From: "Greg Haerr" ####@####.#### Date: 11 Jun 2007 23:50:49 +0100 Message-Id: <1a4001c7ac7a$d115e890$6401a8c0@winXP> > I haven't been able to successfully load a bdf file agter converting it on .fnt file. IIRC someone mentioned there might be an endian problem with .fnt loading, make sure you're running the CVS code. Otherwise, post your target specs. > I tried the t1demo and also get a segfault with it. That was known working, perhaps there's an endian bug also? Are you running big endian? FNT_FONT_DIR = "fonts/bdf" FNTNAME "/fonts/bdf/font.fnt" Try using a full path spec when loading. I'm not familiar with FNTNAME. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
RE: [nanogui] segfault creating font from .fnt file
From: Junior ####@####.#### Date: 11 Jun 2007 23:52:16 +0100 Message-Id: <A4EFE4979B2.0000057Dejr@inbox.com> > -----Original Message----- > From: ####@####.#### > Sent: Mon, 11 Jun 2007 13:46:04 -0800 > To: ####@####.#### > Subject: [nanogui] segfault creating font from .fnt file > > Hi, > I haven't been able to successfully load a bdf file agter converting it > on .fnt file. > I tried the t1demo and also get a segfault with it. > > Has anyone ran into this problem? Is loading .fnt file working? > > #################################################################### > # native .fnt loadable font support > #################################################################### > HAVE_FNT_SUPPORT = Y > HAVE_FNTGZ_SUPPORT = N > FNT_FONT_DIR = "fonts/bdf" > > > and > FNTNAME "/fonts/bdf/font.fnt" > Perhaps I'm misunderstanding this but for these fonts, which are fixed size, I assume the height will be 0. correct? as in GrCreateFont(FONTNAME, 0, NULL); I'm getting a segfaule because the GdCreateFonts returns 0 at : /* check builtin fonts first for speed*/ if (!height && (fontclass == MWLF_CLASS_ANY || fontclass == MWLF_CLASS_BUILTIN)) { for(i = 0; i < scrinfo.fonts; ++i) { if(!strcmpi(pf[i].name, fontname)) { pf[i].fontsize = pf[i].cfont->height; pf[i].fontattr = fontattr; EPRINTF("1 createfont: (height == 0) found builtin font %s (%d)\n", fontname, i); return (PMWFONT)&pf[i]; } } /* * Specified height=0 and no builtin font matched name. * if not font found with other renderer, no font * will be loaded, and 0 returned. * * We used to return the first builtin font. If a font * return needs to be guaranteed, specify a non-zero * height, and the closest builtin font to the specified * height will always be returned. */ } Any size I use returns "not found". Am I using this correctly? Thanks. ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] segfault creating font from .fnt file
From: Junior ####@####.#### Date: 11 Jun 2007 23:57:20 +0100 Message-Id: <A4FCD83FE50.00000582ejr@inbox.com> > -----Original Message----- > From: ####@####.#### > Sent: Mon, 11 Jun 2007 16:49:15 -0600 > To: ####@####.#### ####@####.#### > Subject: Re: [nanogui] segfault creating font from .fnt file > >> I haven't been able to successfully load a bdf file agter converting it >> on > .fnt file. > > IIRC someone mentioned there might be an endian problem > with .fnt loading, make sure you're running the CVS code. > Otherwise, post your target specs. > > >> I tried the t1demo and also get a segfault with it. > > That was known working, perhaps there's an endian bug also? > Are you running big endian? No, I'm running little endian, ARM922 > FNT_FONT_DIR = "fonts/bdf" > FNTNAME "/fonts/bdf/font.fnt" > > Try using a full path spec when loading. I'm not familiar > with FNTNAME. It's really a #define FNTNAME, I guess I copied this incorrectly. The font is really a courB10.bdf. I tried the pcf files used by the demo and the pcf loader is doing the same thing. Thanks. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] segfault creating font from .fnt file
From: "Greg Haerr" ####@####.#### Date: 12 Jun 2007 06:09:12 +0100 Message-Id: <1b3c01c7acaf$ac7c4cb0$6401a8c0@winXP> Well, if you're falling through the for() loop below, it means that your font name isn't matching. In the builtin case, its not supposed to be a path, just a simple text string. Stick some printfs in the loop to see why the match isn't matching. Make sure your name is specified in genfont.c. Also, you could always return &pf[0] rather than 0 in the non-match case, that will get you the first builtin font. Regards, Greg > FNTNAME "/fonts/bdf/font.fnt" > Perhaps I'm misunderstanding this but for these fonts, which are fixed size, I assume the height will be 0. correct? as in GrCreateFont(FONTNAME, 0, NULL); I'm getting a segfaule because the GdCreateFonts returns 0 at : /* check builtin fonts first for speed*/ if (!height && (fontclass == MWLF_CLASS_ANY || fontclass == MWLF_CLASS_BUILTIN)) { for(i = 0; i < scrinfo.fonts; ++i) { if(!strcmpi(pf[i].name, fontname)) { pf[i].fontsize = pf[i].cfont->height; pf[i].fontattr = fontattr; EPRINTF("1 createfont: (height == 0) found builtin font %s (%d)\n", fontname, i); return (PMWFONT)&pf[i]; } } /* * Specified height=0 and no builtin font matched name. * if not font found with other renderer, no font * will be loaded, and 0 returned. * * We used to return the first builtin font. If a font * return needs to be guaranteed, specify a non-zero * height, and the closest builtin font to the specified * height will always be returned. */ } Any size I use returns "not found". Am I using this correctly? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] segfault creating font from .fnt file
From: "Greg Haerr" ####@####.#### Date: 12 Jun 2007 06:10:18 +0100 Message-Id: <1b4101c7acaf$c5e916b0$6401a8c0@winXP> >It's really a #define FNTNAME, I guess I copied this incorrectly. The font is really a courB10.bdf. I tried the pcf files used by the demo and the pcf loader is doing the same thing. Make sure you're running CVS. We may need a backtrace to see where its crashing. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] segfault creating font from .fnt file
From: Junior ####@####.#### Date: 12 Jun 2007 20:04:49 +0100 Message-Id: <AF873D06782.000003A8ejr@inbox.com> > -----Original Message----- > From: ####@####.#### > Sent: Mon, 11 Jun 2007 23:08:28 -0600 > To: ####@####.#### ####@####.#### > Subject: Re: [nanogui] segfault creating font from .fnt file > > >It's really a #define FNTNAME, I guess I copied this incorrectly. > The font is really a courB10.bdf. I tried the pcf files used by the demo > and the pcf loader is doing the same thing. > > Make sure you're running CVS. We may need a backtrace to > see where its crashing. Thanks Grep, Its a "user error", I made a mistake on of the files and the compiler didn't flag it. The t1demo works fine now and I'm about to try the .fnt option. Thanks, --jr. ____________________________________________________________ PREVENT ACCESSING DANGEROUS WEBSITES - Protect your computer with Free Web Security Guard! More information at http://www.inbox.com/wsg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |