<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
Hello folks,<BR>
<BR>
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:<BR>
<BR>
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<BR>
main.c: In function `ListAllFonts':<BR>
main.c:328: error: dereferencing pointer to incomplete type<BR>
make: ** [all] Erro 1<BR>
<BR>
/***** CODE SNIPET ******************************/<BR>
<BR>
<BR>
FcConfig *Config = NULL;<BR>
FcFontSet *FontSet = NULL;<BR>
<BR>
FcPattern *Pattern = NULL;<BR>
FcObjectSet *ObjectSet = NULL;<BR>
FcChar8 *Family;<BR>
<BR>
unsigned int count;<BR>
<BR>
Config = FcInitLoadConfigAndAllFonts();<BR>
if(Config == NULL)<BR>
{<BR>
puts("Error on creating a Fontconfig configuration!");<BR>
return(0);<BR>
}<BR>
<BR>
FcConfigSetCurrent(Config);<BR>
<BR>
Pattern = FcPatternCreate();<BR>
ObjectSet = FcObjectSetBuild(FC_FAMILY, 0);<BR>
FontSet = FcFontList(0, Pattern, ObjectSet);<BR>
<BR>
for(count = 0; count < FontSet->nfont; count++)<BR>
{<BR>
FcPatternGetString(FontSet->fonts[count], FC_FAMILY, 0, &Family);<BR>
<BR>
/** I GOT AN ERROR AT THIS LINE!! ****************************/<BR>
if(FcStrSetMember(Config->disabledFonts, Family))<BR>
/************************************************************/<BR>
<BR>
printf("%s\t\t!!DISABLED!!\n", Family);<BR>
else<BR>
printf("%s\n", Family);<BR>
}<BR>
}<BR>
<BR>
/******* END *******************************/<BR>
<BR>
By the way, disabledFonts is a FcStrSet variable inside FcConfig structure. What I'm doing wrong? I have never seen this error before...<BR>
<BR>
Thanks for the attention!<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Adriano Del Vigna de Almeida <<A HREF="mailto:katmandu@fs.inf.br"><U>katmandu@fs.inf.br</U></A>>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>