Mailinglist Archive: opensuse-bugs (8105 mails)

< Previous Next >
[Bug 246573] “-fd” option doesn't work in xterm
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 19 Feb 2007 10:18:30 -0700 (MST)
  • Message-id: <20070219171830.952C9FC8@xxxxxxxxxxxxxxxxxxxxxx>

------- Comment #28 from mfabian@xxxxxxxxxx 2007-02-19 10:18 MST -------
While debugging this with gdb I found at a breakpoint on “xtermOpenXft()”:

(gdb) p (char *)FcNameUnparse(pat)
$28 = 0x6f9a00 "freemono,sazanami mincho-14:spacing=100:charwidth=36"

static XftFont *
xtermOpenXft(Display * dpy, XftPattern * pat, const char *tag GCC_UNUSED)

In that case “freemono” is opened if it exists, “sazanami mincho”
is just a fallback if “freemono” doesn't exist.

When I look at the code from where “xtermOpenXft()” was called I found:

if (norm != 0 && screen->wide_chars) {
char *face_name = (xw->misc.face_wide_name
? xw->misc.face_wide_name
: xw->misc.face_name);
int char_width = norm->max_advance_width * 2;

TRACE(("xtermComputeFontInfo wide(face %s, char_width %d)\n",

if ((pat = XftNameParse(xw->misc.face_name)) != 0) {
XFT_FAMILY, XftTypeString, face_name,
XFT_SIZE, XftTypeDouble, face_size,
XFT_CHAR_WIDTH, XftTypeInteger, char_width,
(void *) 0);
wnorm = xtermOpenXft(dpy, pat, "wide");

xw->misc.face_wide_name contains “sazanami mincho”.
Therefore, face_name contains “sazanami mincho” as well.

xw->misc.face_name contains“freemono”. Therefore the pattern used as the
first argument of XftPatternBuild contains “freemono”. Various
values are added to this pattern using XftPatternBuild(), especially
face_name which contains “sazanami mincho”. Therefore, the new pattern
contains “freemono,sazanami-mincho[...]”. This will always
select freemono if available (At least for current version of fontconfig/Xft.
Was this ever different?)

Considering this, I believe that

pat = XftNameParse(xw->misc.face_name)

is a typo and it should have been

pat = XftNameParse(face_name)

which makes it work. Then, after XftPatternBuild(), the pattern starts with
“sazanami mincho,sazanami mincho[...]” which works. It is not necessary
to add the same font name twice to the pattern, therefore I guess
adding face_name again can be omitted.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

< Previous Next >