https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #28 from mfabian@novell.com 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" (gdb) #if OPT_RENDERFONT 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 OPT_RENDERWIDE 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", face_name, char_width)); if ((pat = XftNameParse(xw->misc.face_name)) != 0) { XftPatternBuild(pat, XFT_FAMILY, XftTypeString, face_name, XFT_SIZE, XftTypeDouble, face_size, XFT_SPACING, XftTypeInteger, XFT_MONO, 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: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.