nanogui: segfault creating font from .fnt file


Previous by date: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Greg Haerr
Next by date: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Junior
Previous in thread: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Greg Haerr
Next in thread: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Junior

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

Previous by date: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Greg Haerr
Next by date: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Junior
Previous in thread: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Greg Haerr
Next in thread: 11 Jun 2007 23:52:16 +0100 Re: segfault creating font from .fnt file, Junior


Powered by ezmlm-browse 0.20.