[Fontconfig] Error accessing a FcConfig internal element

Adriano Del Vigna de Almeida katmandu at fs.inf.br
Sat Jan 3 01:16:42 EST 2004


Hello folks,

I'm having a strange error. When I try to access some internal variable
inside a FcConfig strucutre from a program I receive the following
error:

gcc -I /usr/include/freetype2 `pkg-config --cflags glib-2.0`
-lfontconfig `pkg-config --libs glib-2.0` main.c fontsbase.c
fcconfighandlers.c -o fontman
main.c: In function `ListAllFonts':
main.c:328: error: dereferencing pointer to incomplete type
make: ** [all] Erro 1

/***** CODE SNIPET ******************************/


    FcConfig *Config = NULL;
    FcFontSet *FontSet = NULL;
                                                                                                                            
    FcPattern *Pattern = NULL;
    FcObjectSet *ObjectSet = NULL;
    FcChar8 *Family;
                                                                                                                            
    unsigned int count;
                                                                                                                            
    Config = FcInitLoadConfigAndAllFonts();
    if(Config == NULL)
    {
        puts("Error on creating a Fontconfig configuration!");
        return(0);
    }
                                                                                                                            
    FcConfigSetCurrent(Config);
                                                                                                                            
    Pattern = FcPatternCreate();
    ObjectSet = FcObjectSetBuild(FC_FAMILY, 0);
    FontSet = FcFontList(0, Pattern, ObjectSet);
                                                                                                                            
    for(count = 0; count < FontSet->nfont; count++)
    {
        FcPatternGetString(FontSet->fonts[count], FC_FAMILY, 0,
&Family);

        /** I GOT AN ERROR AT THIS LINE!! ****************************/
        if(FcStrSetMember(Config->disabledFonts, Family))
        /************************************************************/

            printf("%s\t\t!!DISABLED!!\n", Family);
        else
            printf("%s\n", Family);
    }
}

/******* END *******************************/

By the way, disabledFonts is a FcStrSet variable inside FcConfig
structure. What I'm doing wrong? I have never seen this error before...

Thanks for the attention!

-- 
Adriano Del Vigna de Almeida <katmandu at fs.inf.br>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/fontconfig/attachments/20040102/7d0c7c5a/attachment.html


More information about the Fontconfig mailing list