Issue144

classification
Title [Q] xft recipe
Type Module
Severity Platform
Keywords
explanation
process
These optional controls are only of interest to committers and tracker administrators.
Status chatting   Reason
Superseder   Submitted 2007-11-02.14:25:22
Priority   Assigned To
Nosy List  

Created on 2008-01-19.06:43:00 by didier, last changed 2008-01-19.06:43:00 by aidan.

Messages
msg199 [hidden] ([hidden]) Date: 2008-01-19.06:43:00
  Message-ID: <18219.20150.960302.668733@parhasard.net>
Ar an dara lá de mí na Samhain, scríobh Didier Verna: 

 > I would like to give xft a try, but I can't manage to get something
 > close to my current font setting, which is like this (from XEmacs'xrdb file):
 > 
 > XEmacs.default.attributeFont: -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
 >
 > XEmacs*font: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
 >
 > Can somebody give me a recipe for that (preferably in Lisp, otherwise,
 > as X resources) ?

This, in my ~/.Xdefaults:

#ifdef XEMACS_XFT
XEmacs.default.attributeFont: Courier-12
XEmacs*font: Helvetica-12:style=bold
#else
XEmacs.default.attributeFont: -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
XEmacs*font: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
#endif

gives me two identical frames on my local machine, with one frame
belonging to an XEmacs build with server-side fonts and with X defaults
not reflecting XEMACS_XFT, and the other frame belonging to an XEmacs build
with Xft fonts and with X defaults reflecting XEMACS_XFT. This requires a)
that XFT believes that the display has the same DPI as does the X server and
b) that XFT has access to the same font files on disk. 

The fonts used by the menubars are not accessible from Lisp right now,
sorry. But for the default face, (set-face-font 'default nil "Courier-12")
should do the job. 

To check what DPI the X server-side fonts think your display has, try 

xdpyinfo | grep 'dots per inch'

To check what DPI the X client-side fonts think your display has, 

appres Xft

If that gives you a value for DPI, that’s what’s used by client-side fonts;
if it doesn’t, the server side DPI value will be used.

To check what font file XFT uses for a given pattern, try, for example, 

fc-match -v 'Helvetica-12:style=bold' | grep file

This gives file: "/usr/X11R6/lib/X11/fonts/75dpi/helvB12.pcf.gz" 
for me. When I grep for helvB12.pcf.gz in
/usr/X11R6/lib/X11/fonts/75dpi/helvB12.pcf.gz, I get this:

helvB12.pcf.gz -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso10646-1

which matches your server-side pattern sufficiently that I’m reasonably sure
it’s the same font.
msg198 [hidden] ([hidden]) Date: 2008-01-19.06:43:00
  Message-ID: <muxsl3obu7h.fsf@uzeb.lrde.epita.fr>
Hello,

I would like to give xft a try, but I can't manage to get something
close to my current font setting, which is like this (from XEmacs'xrdb file):

XEmacs.default.attributeFont: -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1
XEmacs*font: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1

Can somebody give me a recipe for that (preferably in Lisp, otherwise,
as X resources) ?

Thank you.
History
Date User Action Args
2008-01-19 06:43:00aidansetstatus: new -> chatting
messages: + msg199
2008-01-19 06:43:00didiercreate