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

fontconfig and some strange problems



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am running a sid system

A few weeks ago I suddenly noticed that konsole in kde was giving strange 
fonts.  It seemed to me after I had installed fontconfig. 

One particular problem is that certain fonts give a double spacing when used 
in konsole.  I reported this as a bug at kde. see 
http://bugs.kde.org/show_bug.cgi?id=52538   
for a complete description of the problem including a screenshot. Removing 
fontconfig did not seem to make the problem go away, so I re-installed it.  
Furthermore, I was also able to show that this only seemed to be affected 
when

a) The fonts have a -c- or a -m- in the font descriptions (in the font spacing 
field), AND

b) the metrics showing the character width in pixels etc were NOT zero

After a bit of work with a debugger I discovered I could reproduce the 
situation at will with a simple qt application which toggled the Fixed Pitch 
Property of a font.  With it on, the font displayed in a simple edit box as 
double width, with it off it displayed normally.

I have spent over a week now with this little application and a debugger (gvd) 
single stepping my way through the qt libraries (built from source) in order 
to try and figure out what is going wrong.  I still havent got far enough 
into it to figure this out. (its complicated :-( )

As I am going to be staying in a hotel tomorrow night, I transfered this 
development enviromment to my laptop (which also has debian unstable 
installed) in order to spent my lonely evening trying to do some more 
debugger work trying to understand this.

HOWEVER - the application did not show this problem as a bug on this machine.  
A quick check showed that fontconfig was not installed (although 
libfontconfig1 was).  So I installed it.

This made the fonts in konsole show the symptoms of the problem, although my 
little application now worked perfectly (maybe because its using the default 
fonts).

I tried to do a comparison with /etc/fonts/fonts.conf between my two machines 
to see if anything was different.  I had added console font as one to be 
aliased to monospaced on my main machine, so I tried adding that to the same 
file on my portable.  This didn't make my test program produce the symptoms.  
So I removed this change again.
  
Anyway, after this process I did a dpkg-reconfigure on fontconfig.  After I 
ran that on my laptop, my application now shows the symptoms of the problem.  

Now I am not sure how fontconfig works, but whilst it is doing a 
dpkg-reconfigure it says it is regenerating the font cache. It is almost as 
though running through this process more than once changes the outcome.

Where do I go from here?  I now can't make the application go back to working 
again - so I will probably spend some more time with the debugger trying to 
see how qt knows where to put the cursor (it seems to take care of the double 
width properly).  

Only one other person seems to have seen the same symptoms as me - so I am 
puzzled as whether this should be reported as a bug, and if so what in 
(fontconfig? libxft? libfreetype? libqt?).  I tried asking questions on the 
fontconfig and qt-interest mailing lists - but no-one has replied.

Any help here at getting to the bottom of this welcome.

- -- 
Alan Chandler
alan@chandlerfamily.org.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+Nv0PuFHxcV2FFoIRAqtMAJ4+yRKthCKBeaoe6qt+WoYsK4hZ7ACfQYsr
u5uIMefTOuDWu8YXa7OrBXI=
=qbK7
-----END PGP SIGNATURE-----



Reply to: