Re: Xterm, Xft and line spacing

2003-03-07 Thread David Dawes
On Thu, Mar 06, 2003 at 08:55:45PM -0800, Keith Packard wrote:
Around 23 o'clock on Mar 6, David Dawes wrote:

 I'm looking for as many rows as I can get in a given xterm size with a
 readable font, so I'd like to get rid of that unused white space.  I tried
 a few things, and found that setting the font height to ascent + descent
 instead of what Xft reports as the height solves this.

The height in the XftFont structure is the line spacing defined by the font
designer as stored in the font itself, and often includes more spacing than
is strictly necessary. Font designers are generally more concerned about 
readability than density.  As a result, Xft provides an option to ignore the
font's specified height and use the ascent+descent instead:

   $ xterm -fa monospace-11:minspace=true

Thanks Keith.  That does the trick.

David
-- 
David Dawes
Release Engineer/Architect  The XFree86 Project
www.XFree86.org/~dawes
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Xterm, Xft and line spacing

2003-03-06 Thread Keith Packard
Around 23 o'clock on Mar 6, David Dawes wrote:

 I'm looking for as many rows as I can get in a given xterm size with a
 readable font, so I'd like to get rid of that unused white space.  I tried
 a few things, and found that setting the font height to ascent + descent
 instead of what Xft reports as the height solves this.

The height in the XftFont structure is the line spacing defined by the font
designer as stored in the font itself, and often includes more spacing than
is strictly necessary. Font designers are generally more concerned about 
readability than density.  As a result, Xft provides an option to ignore the
font's specified height and use the ascent+descent instead:

$ xterm -fa monospace-11:minspace=true

You can also force a font to use minspace in your ~/.fonts.conf file:

?xml version=1.0?
!DOCTYPE fontconfig SYSTEM fonts.dtd
!-- ~/.fonts.conf for per-user font configuration --
fontconfig
 match target=font
test name=family
stringBitstream Vera Sans Mono/string
/test
edit name=minspace
booltrue/bool
/edit
/match
/fontconfig

Replace 'Bitstream Vera Sans Mono' with the name of the font you're using 
in xterm (if you're using 'monospace', you can see what that resolves to by
using 'xfd -fa monospace').

I'm also working with Bitstream to reduce the height of the Vera Sans Mono
font -- you're not the first to ask for more lines on the screen.

-keith


___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel