Re: unknown encoding error in Fontconfig config file

2004-08-26 Thread Steinar Bang
 Steinar Bang [EMAIL PROTECTED]:

 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.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



unknown encoding error in Fontconfig config file

2004-08-21 Thread Steinar Bang
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.

Is there a way to find the offending file causing the error messages?
Some debug option, perhaps?

I have googled, and seen others on with this error message (mostly on
GTk applications), but no answers to what causes it.

The debian fontconfig package has three config files
/etc/fonts/fonts.conf
/etc/fonts/local.conf
/var/lib/fontconfig/local.conf
They all start with
?xml version=1.0?
I have tried changing that to
?xml version=1.0 encoding=utf-8?
but it didn't make any difference.

KDE applications work without a hitch.  fc-list works without giving
any error messages.

fc-list helvetica
gives me:
Helvetica:style=Bold Italic
Helvetica:style=Italic
Helvetica:style=Bold
Helvetica:style=Regular

fc-cache -v as my own user gives the following output:
fc-cache: /usr/share/fonts: skipping, no write access
fc-cache: /usr/X11R6/lib/X11/fonts/Type1: skipping, no write access
fc-cache: /usr/local/share/fonts: skipping, no write access
fc-cache: /home/sb/.fonts: skipping, no such directory
fc-cache: /var/lib/defoma/fontconfig.d: skipping, no write access
fc-cache: /usr/X11R6/lib/X11/fonts: skipping, no write access
fc-cache: succeeded
fc-cache -v as root gives a lot more output.

There is an environment variable LANG=C set, but no LC_* variables
set. 

Thanx!


- Steinar


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]