Your message dated Sun, 10 Jul 2011 23:14:19 +0800
with message-id <[email protected]>
and subject line Re: Bug #179519: libxft2: monospaced fonts giving wrong font 
metrics
has caused the Debian Bug report #179519,
regarding libxft2: monospaced fonts giving wrong font metrics
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
179519: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=179519
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: libxft2
Version: 2.1-7

I have been trying to track down a problem in KDE/Konsole in which the fonts 
seem to display all wrong. (See http://bugs.kde.org/show_bug.cgi?id=52538 
 for a description - and also a screen dumpt is attached).

In order to track down what is happening, I have a small QT only app which 
creates a simple one line display of text ("Pack my box with five dozen 
liquor jugs") and toggles the "Fixed Pitch" attribute of the attached font. I 
have run this with the default Helvetica font and with the Console font that 
kde provides for using with konsole.

With a debugger I have managed to track down what qt does. It asks xft for a 
unicode font which matches the font family, weight, slant etc - including 
checking whether its an not fixed pitch (XFT_PROPORTIONAL) or  fixed pitch 
(XFT_MONO or XFT_CHARCELL - strictly it actually checks for value > 
XFT_MONO).  With a handle to that font, it then asks for the width, one by 
one of each character in the string -  I am not an expert in libxft2, but I 
think it is using XftTextExtent16 to fetch this metric (maybe from a cache) 
based on a screen resolution of 100dpi.

With Helvetica, in proportional mode, its getting response, that varies by 
character from 4 pixels (space) to 9 pixels ('m'). This is drawn as would be 
expected and looks great (see below related to drawing). If I ask for 
Helvetica in monospaced, I get the same characters, but the width of each 
character is reported as 12 pixels. This obviously stretches the text out so 
that it looks ugly.

A word on drawing the text.  As far as I can make out, QT is asking XFT to 
render the font as a single command for the complete string.  However, QT is 
keeping track of the cursor position relative to each character based on the 
width values talked about above.  Since the cursor and the text remain in 
perfect combination regardless of whether they are stretched or not then I 
assume XFT is rendering the fonts according to the metrics it reports.

I repeated these tests with the the Console font (debian package 
xfonts-konsole downloaded from Ralf Nordens debian packages)

With the Console font in place I get wider widths and a very bold looking 
text. In proportional mode, they look reasonably spaced - but do very from 
character to character (despite suposidley being a monospaced font).  In 
monospaced mode each character is reported as an enormous 26 pixels wide 
(this on a point size that is supposed to be 12).

I think there might be two problems interacting.  This all started when I 
first installed fontconfig.  I do not believe that the font displayed when I 
request Console is actually the console font.  It looks a lot blacker and 
larger than it used to look before fontconfig was installed.  Its as though I 
am being redirected to another font.

However, the monospaced width problem occurs also with the Helvetica font - an 
this definately displays in the same way as before when it is proportional.

- -- 
Alan Chandler
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+PY5yuFHxcV2FFoIRAtVhAJ9hbHRtMJVFgpMXMWMcSx9Y7UWziQCfSqMc
yrOo5fqerbKl8TsVSUzCY2Q=
=Y1ju
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
Ancient bug in 2003, and the problems mentioned has been already
addressed (at least I don't see any of them still appear now). Closing.


-- 
Regards,
Aron Xu


--- End Message ---

Reply via email to