[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "unknown encoding" error in Fontconfig config file



>>>>> Steinar Bang <sb@dod.no>:

> Platform: Pentium M (Dell Latitude D600 laptop),
> 	  debian sarge (testing/unstable),
> 	  XFree86 4.3.0.dfsg.1-4,
> 	  qt 3.3.2-0pre2,
> 	  kde 3.2.2-1,
> 	  fontconfig 2.2.3-1

> When I came back from vacation, I did an "apt-get dist-upgrade" which
> upgraded a lot of packages.  After this, my own Qt application has
> acted strangely.  It prints out
> 	Fontconfig error: line 1: unknown encoding
> 	Fontconfig error: Cannot load default config file
> to the console when starting up, and comes up with a really strange
> looking font (from the output resulting from setting FC_DEBUG=1, it
> looks like it may be a font called "Arioso"?).

> I'm aiming for helvetica, which should be the default font for Qt
> anyway.

What caused this problem was that my application was linked with two
separate versions of expat, both as shared libraries.

I verified this by eliminated my application's need for my own version
of expat, and instead made it use the same version as Fontconfig
(ie. libexpat 1.95.6-8 in debian sarge).

This made my application start up without the error message, and with
the expected Helvetica font.

But this gives me a serious performance hit, since the native expat
shared lib on debian is compiled to deliver strings as UTF-8 in single
width char strings, while my code is actually expecting UTF-16 in
short int arrays (or wchar_t arrays).  I don't know what to do about
that.

I'm guessing the character width/encoding compile time difference, is
probably what caused the Fontconfig errors in the first place.



Reply to: