[Bug 246573] New: “-fd” option doesn't work in xterm
https://bugzilla.novell.com/show_bug.cgi?id=246573 Summary: “-fd” option doesn't work in xterm Product: openSUSE 10.3 Version: Alpha 1 Platform: All OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mfabian@novell.com QAContact: sndirsch@novell.com “-fd” option doesn't work in xterm. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #1 from mfabian@novell.com 2007-02-16 17:21 MST ------- From “man xterm”: -fd pattern This option sets the pattern for double-width fonts selected from the FreeType library if support for that library was com‐ piled into xterm. This corresponds to the faceNameDoublesize resource. But when I try this option: mfabian@magellan:~$ xterm -fa "courier" -fd "sazanami gothic"& [1] 23651 mfabian@magellan:~$ ps aux | grep xterm mfabian 23651 1.4 0.4 62772 9824 pts/1 S 01:15 0:00 xterm -n mfabian@magellan xterm -title mfabian@magellan xterm -fa courier -fd sazanami gothic mfabian@magellan:~$ grep fonts /proc/$(pidof xterm)/maps 2adfb7a16000-2adfb7a35000 r--p 00000000 03:01 1493358 /usr/share/fonts/Type1/cour.pfa 2adfb7a35000-2adfb7a54000 r--p 00000000 03:01 1493360 /usr/share/fonts/Type1/courb.pfa mfabian@magellan:~$ I.e. the “Sazanami Gothic” font has not been opened. Of course Japanese double-width characters can not be displayed in xterm then. The font is available on the system: mfabian@magellan:~$ fc-list "sazanami gothic" family font file /usr/share/fonts/truetype/sgothic.ttf: さざなみゴシック,Sazanami Gothic /usr/share/fonts/truetype/sazanami-gothic.ttf: さざなみゴシック,Sazanami Gothic mfabian@magellan:~$ (The first one is only a symlink which is used as a workaroudn for bug #196191, it has nothing to do with the problem reported here, the same problem occurs for *all* double width fonts). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #2 from mfabian@novell.com 2007-02-16 17:25 MST ------- Xterm version is 224. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #3 from dickey@his.com 2007-02-16 18:16 MST ------- Created an attachment (id=119789) --> (https://bugzilla.novell.com/attachment.cgi?id=119789&action=view) illustration of xterm using Sazanami Gothic font This is one of dialog's test-cases running in xterm-224. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #4 from dickey@his.com 2007-02-16 18:18 MST ------- See the attachment in #3, which I generated on Debian/testing using the given font with xterm-224. Given that someone pointed out that SuSE uses the imake configuration rather than xterm's configure script, I suggest that the problem is SuSE's own configuration. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #5 from mfabian@novell.com 2007-02-16 19:27 MST ------- Thank you very much for proving with the screen shot that it can work in xterm-244 if done right. The problem could very well be in the SuSE configuration. I'll try to check. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Priority|P5 - None |P2 - High ------- Comment #6 from sndirsch@novell.com 2007-02-17 01:18 MST ------- Yes, we're still using the imake configuration. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |sndirsch@novell.com |screening@forge.provo.novell| |.com | Status|ASSIGNED |NEW ------- Comment #7 from sndirsch@novell.com 2007-02-17 05:09 MST ------- xtermcfg.h: /* #undef OPT_DEC_CHRSET */ /* CF_ARG_DISABLE(doublechars) */ I think it's this one. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #8 from sndirsch@novell.com 2007-02-17 05:17 MST ------- fixed. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #9 from dickey@his.com 2007-02-17 06:47 MST ------- That shouldn't make it work. The ifdef controls code that provides double-high and double-wide DEC characters from bitmap fonts. It can be demonstrated using vttest menu 4. Looking at your patch for #223, it seems that corresponds roughly to these configure options: --disable-pty-handshake \ --disable-regex \ --enable-256-color \ --enable-dec-locator \ --enable-hp-fkeys \ --enable-luit \ --enable-mini-luit \ --enable-sco-fkeys \ --enable-wide-chars \ However, there are several feature checks which are missing, e.g., for wchar.h, wcwidth(), wcswidth(). Also, it seems odd: is luit really in /bin ? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@novell.com Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #10 from sndirsch@novell.com 2007-02-17 08:02 MST ------- Ok. Looks like I've took the wrong define. It seems there is no quick & dirty fix and I need to finally switch to configure. JFYI, luit is installed to /usr/bin. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #11 from sndirsch@novell.com 2007-02-17 08:54 MST -------
Looking at your patch for #223, it seems that corresponds roughly to these configure options: --disable-pty-handshake \ --disable-regex \ Not by intention (see below).
--enable-256-color \ --enable-dec-locator \ --enable-hp-fkeys \ --enable-luit \ --enable-mini-luit \ --enable-sco-fkeys \ --enable-wide-chars \
Yes. And "--with-utempter".
However, there are several feature checks which are missing, e.g., for wchar.h, wcwidth(), wcswidth(). Indeed. Which defaults for new features were missing in our xtermcfg.h? Here is the list:
#define HAVE_GETHOSTNAME 1 /* AC_CHECK_FUNCS(gethostname) */ #define HAVE_POSIX_SAVED_IDS 1 /* CF_POSIX_SAVED_IDS */ #define HAVE_PUTENV 1 /* AC_CHECK_FUNCS(putenv) */ #define HAVE_SCHED_YIELD 1 /* AC_CHECK_FUNCS(sched_yield) */ #define HAVE_STRFTIME 1 /* AC_CHECK_FUNCS(strftime) */ #define HAVE_WCHAR_H 1 /* AC_CHECK_HEADERS(wchar.h) */ #define HAVE_WCSWIDTH 1 /* AC_CHECK_FUNCS(wcswidth) */ #define HAVE_WCWIDTH 1 /* AC_CHECK_FUNCS(wcwidth) */ #define HAVE_XKB_BELL_EXT 1 /* CF_XKB_BELL_EXT */ #define OPT_BROKEN_OSC 1 /* CF_ARG_ENABLE(broken-osc) */ #define OPT_BROKEN_ST 0 /* CF_ARG_DISABLE(broken-st) */ #define OPT_PASTE64 0 /* CF_ARG_ENABLE(past64) */ #define OPT_PTY_HANDSHAKE 1 /* CF_ARG_ENABLE(pty-handshake) */ #define OPT_SELECT_REGEX 1 /* CF_ARG_DISABLE(regex) */ #define SIG_ATOMIC_T volatile sig_atomic_t /* CF_SIG_ATOMIC_T */ #define USE_STRUCT_LASTLOG 1 /* CF_STRUCT_LASTLOG */ Anyway, I'll switch to the use of configure --enable-256-color \ --enable-dec-locator \ --enable-hp-fkeys \ --enable-luit \ --enable-mini-luit \ --enable-sco-fkeys \ --enable-wide-chars \ --with-utempter -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #12 from dickey@his.com 2007-02-17 09:10 MST ------- See my note - I was reading the patch for 223-12, which I had at hand (it takes time to locate things on your ftp site ;-) -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #13 from mfabian@novell.com 2007-02-17 15:22 MST ------- I don't know why but it still doesn't seem to work. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #14 from dickey@his.com 2007-02-17 15:29 MST ------- I'm not sure - I just tried the configure options you gave above, and it seems to work for me (still Debian/testing). That doesn't have utempter (doesn't matter), but the rest should be the same. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #15 from sndirsch@novell.com 2007-02-18 01:30 MST ------- Created an attachment (id=119829) --> (https://bugzilla.novell.com/attachment.cgi?id=119829&action=view) xtermcfg.h xtermcfg.h after calling configure. Still anything missing? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #16 from dickey@his.com 2007-02-18 08:33 MST ------- Created an attachment (id=119831) --> (https://bugzilla.novell.com/attachment.cgi?id=119831&action=view) debugging trace showing fonts loaded by xterm -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #17 from dickey@his.com 2007-02-18 08:36 MST ------- I don't see any significant differences with the xtermcfg.h, and suspect that the problem may lie in a change to Xft. For reference, I attached in #16 the beginning of a debug trace (by adding --enable-trace), which shows the information that xterm's using for loading the fonts. There might be some additional information that I could gather later in execution, but I'm not sure what that could be. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119831|application/octet-stream |text/plain mime type| | -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #18 from sndirsch@novell.com 2007-02-18 09:21 MST ------- I added "--enable-trace" for building, [...] checking if you want debugging traces... yes [...] but don't know how to enable the debugging trace when calling xterm. :-( -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #19 from sndirsch@novell.com 2007-02-18 09:50 MST ------- By accident I found Trace-child.out/Trace-parent.out in my $HOME. I'll attach them. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #20 from sndirsch@novell.com 2007-02-18 09:51 MST ------- Created an attachment (id=119836) --> (https://bugzilla.novell.com/attachment.cgi?id=119836&action=view) Trace-child.out "child" trace file for xterm -fa "courier" -fd "sazanami gothic" -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #21 from sndirsch@novell.com 2007-02-18 09:52 MST ------- Created an attachment (id=119837) --> (https://bugzilla.novell.com/attachment.cgi?id=119837&action=view) Trace-parent.out "parent" trace file for xterm -fa "courier" -fd "sazanami gothic" -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #22 from dickey@his.com 2007-02-18 09:54 MST ------- Trace-parent.out is the more interesting one, since it has all of the graphics data. Trace-child.out only has the environment variables, and a small amount of status for the pseudo-terminal. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #23 from dickey@his.com 2007-02-18 10:15 MST ------- One possibility that comes to mind is noting the failure to load a (bitmap) wide-bold font (line 556). That may be hiding the Xft setting, since xterm uses the bitmap fonts internally for bookkeeping. I can see most of the related resource information in the trace, but it would be helpful to have a copy of the resource file that corresponds to this session. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119837|0 |1 is obsolete| | ------- Comment #24 from sndirsch@novell.com 2007-02-19 03:20 MST ------- Created an attachment (id=119901) --> (https://bugzilla.novell.com/attachment.cgi?id=119901&action=view) Trace-parent.out debug trace from current session -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #25 from sndirsch@novell.com 2007-02-19 03:21 MST ------- Created an attachment (id=119902) --> (https://bugzilla.novell.com/attachment.cgi?id=119902&action=view) xrdb-query output of "xrdb -query" (current Xressources). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119836|0 |1 is obsolete| | -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #26 from sndirsch@novell.com 2007-02-19 03:22 MST ------- Created an attachment (id=119903) --> (https://bugzilla.novell.com/attachment.cgi?id=119903&action=view) xterm-app-defaults.tar.bz2 tarball of xterm app-defaults -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #27 from mfabian@novell.com 2007-02-19 10:01 MST ------- Created an attachment (id=119972) --> (https://bugzilla.novell.com/attachment.cgi?id=119972&action=view) bugzilla-246573-fd-option-does-not-work.patch The attached patch makes it work for me. -- 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.
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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #29 from mfabian@novell.com 2007-02-19 10:28 MST ------- I cannot understand why it worked for Thomas as he has shown in the screen shot attached to comment #3. How is that possible? Without that patch it worked for me only for special cases like xterm -fa "sazanami gothic" -fd "sazanami gothic" because that works around the problem I tried to fix in my patch by putting only "sazanami gothic" and nothing else in the pattern. But Thomas's screen shot clearly shows a courier like serif font used for the single width glyphs. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #30 from mfabian@novell.com 2007-02-19 10:44 MST ------- Thomas Dickey> suspect that the problem may lie in a change to Xft. I also wonder whether older versions of Xft/fontconfig exist where something like “freemono,sazanami gothic”worked. Currently I am using fontconfig 2.4.1 and Xft 2.1.12 (openSUSE 10.3 Alpha). I also tried with fontconfig 2.3.2.20050721 and Xft 2.1.6 on SuSE Linux 9.3, the result was the same, it didn't work without my patch. I can imagine that this might have worked with Xft 1 because Xft 1 had automatic fallbacks to other fonts if a font didn't have all needed glyphs. But Xft 1 is so long ago, I doubt that anybody still uses that and I don't have a system with Xft 1 available for testing. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #31 from dickey@his.com 2007-02-19 14:52 MST ------- I can't account for it either - looking at changes to that file, XftNameParse() has "always" used the widget's variable (though I agree that the proposed change seems correct). dpkg says I'm using these packages (and note that each of us may have patches in either of those): libfontconfig1 2.4.2-1 libxft2 2.1.8.2-8 -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #32 from dickey@his.com 2007-02-19 15:10 MST ------- Rebuilding xterm with the change, I don't see a difference in the font (so it's good for me too). But I see another bug (now that I have this testcase ;-). Repainting of the double-wide characters is not working properly (pop another window over the xterm, then expose it - or just use the control/left menu to do a redraw-window). A quick check shows me it is not a new bug (it's present in #212). I'll work on a fix for that this week, intend to put out #225 as bug-fixes only. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #33 from mfabian@novell.com 2007-02-20 04:38 MST ------- Thomas Dickey> Repainting of the double-wide characters is not working Thomas Dickey> properly (pop another window over the xterm, then expose it - I can reproduce that here as well. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 mfabian@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119972|0 |1 is obsolete| | ------- Comment #34 from mfabian@novell.com 2007-02-20 04:52 MST ------- Created an attachment (id=120070) --> (https://bugzilla.novell.com/attachment.cgi?id=120070&action=view) bugzilla-246573-fd-option-does-not-work.patch improved patch. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #35 from mfabian@novell.com 2007-02-20 05:07 MST ------- I had an idea to improve the patch (improved version attached is to comment #34): Adding "face_name" again to the pattern if it is already there doesn't hurt of course, but it doesn't have any advantage either. So why not add something to the pattern which is a nice fallback? I got this idea because the code for the single width font does exactly that, it adds "monospace", i.e. when the font specified with "-fa foo" doesn't exist, "monospace" is used as a fallback, which is usually good. So why not do that for the double width font as well? When one is running in a CJK locale, "monospace" will expand to a good monospace font for the CJK locale, i.e. with that improved patch one can omit the "-fd" option and it will still work nicely as long as one is running in a CJK locale. I can see a slight disadvantage though: If running in a non-CJK locale, for example en_US.UTF-8, xterm -fa courier will open an extra font because of the "-fd monospace" default if the result of "fc-match monospace" happens to be different from the font given behind "-fa" (I can see that in the strace). Opening this extra font is usually completely useless in that case because "fc-match monospace" usually doesn't expand to a CJK monospace font unless one is running in a CJK locale. But that is probably not a valid reason against using "monospace" as the default for "-fd" because this looks like another bug to me: If the font which is going to be opened for double width does not support double width at all, it would be nice not to open it because it is useless anyway (If the user specified such a font with "-fd" on the command line, maybe one should even print a warning). There seems to be code in xterm to check that (function is_double_width_font_xft()), maybe this code is not yet perfect. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #36 from mfabian@novell.com 2007-02-20 07:06 MST ------- I found another (minor) problem: mfabian@magellan:~$ fc-list "Sazanami Gothic" spacing mfabian@magellan:~$ fc-list "MS PGothic" spacing mfabian@magellan:~$ fc-list "MS Gothic" spacing :spacing=90 mfabian@magellan:~$ I.e. "Sazanami Gothic" and "MS PGothic" are proportional fonts (at least fontconfig thinks so) and "MS Gothic" is a dualspaced font. When a font is used as the single width font where fontconfig thinks it is a "dual spaced" font it doesn't work right, i.e. mfabian@magellan:~$ xterm -fa "MS Gothic" -fd "MS Gothic" won't work well, all characters, even the single width characters, become double width. But when a font is used where fontconfig thinks it is a “proportional” font like “Ms PGothic” is used, i.e. mfabian@magellan:~$ xterm -fa "MS PGothic" -fd "MS PGothic" it works a bit better although there are overlapping problems with the single width glyphs because this font is really proportional in the single width glyphs (but still monospaced in the double width glyphs). “Sazanami Gothic” is a dual width font for all practial purposes, therefore xterm -fa "Sazanami Gothic" -fd "Sazanami Gothic" works well. The reason fontconfig doesn't recognize it as a dual width font is probably due to some bugs in “Sazanami Gothic” some single width glyphs are probably broken (too wide) but as most common glyphs are correct, it works OK. Because of the problem describe above, LC_ALL=ja_JP.UTF-8 xterm -fa monospace -fd monospace might not work because "monospace" may happen to expand to a dual width font. That "monospace" may expand to a dual width font is perfectly fine, actually it is the closest approximation of monospace for a CJK locale. Unfortunately xterm cannot yet deal well with that. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #37 from sndirsch@novell.com 2007-02-21 04:17 MST ------- (In reply to comment #34)
Created an attachment (id=120070) --> (https://bugzilla.novell.com/attachment.cgi?id=120070&action=view) [edit] bugzilla-246573-fd-option-does-not-work.patch
improved patch. applied for STABLE/Factory.
-- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #38 from mfabian@novell.com 2007-02-21 13:13 MST ------- To investigate the problem I mentioned in comment #36, I checked the values of gi1 and gi2 in the function is_double_width_font_xft() after the two XftTextExtentsUtf8() calls. Results: (gdb) run -fa "Sazanami Gothic" -fd "Sazanami Gothic" [...] (gdb) p gi1 $39 = {width = 177, height = 13, x = -2, y = 13, xOff = 190, yOff = 0} (gdb) p gi2 $40 = {width = 177, height = 18, x = 0, y = 15, xOff = 190, yOff = 0} (gdb) (gdb) run -fa "MS PGothic" -fd "MS PGothic" [...] (gdb) p gi1 $31 = {width = 178, height = 13, x = -1, y = 13, xOff = 190, yOff = 0} (gdb) p gi2 $32 = {width = 188, height = 18, x = -1, y = 15, xOff = 190, yOff = 0} (gdb) (gdb) run -fa "MS Gothic" -fd "MS Gothic" [...] (gdb) p gi1 $35 = {width = 99, height = 18, x = -1, y = 15, xOff = 100, yOff = 0} (gdb) p gi2 $36 = {width = 188, height = 18, x = -1, y = 15, xOff = 190, yOff = 0} (gdb) I.e. ((2 * gi1.xOff == gi2.xOff) || (gi1.xOff == gi2.xOff)) is false in case of "MS Gothic" and is_double_width_font_xft() thus returns false. I'm still a bit confused what the above numbers mean and what the real cause for the problem is, I'll look further into that tomorrow. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #39 from sndirsch@novell.com 2007-02-22 05:04 MST ------- Thomas, would you like to comment the issues Mike mentioned in his comments #36 and later? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #42 from mfabian@novell.com 2007-02-22 09:11 MST ------- fontutils.c line 605: #define HALF_WIDTH_CHAR1 0x0031 /* 'l' */ The comment doesn't agree with the code point, 0x0031 is '1', not 'l'. I'm not sure what was intended, probably it doesn't matter much, both 'l' and '1' are probably narrower than 'W' in most proportional fonts. But maybe it should be fixed so that the comment agrees with the code point. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #43 from mfabian@novell.com 2007-02-22 10:05 MST ------- I made a small test program to check what happens in is_double_width_font_xft(). (I'll attach that in the next comment). I found that the results depend on the hinting settings. I played with the following settings in ~/.fonts.conf: <match target="font" > <edit mode="assign" name="embeddedbitmap" > <bool>false</bool> </edit> </match> <match target="font" > <edit mode="assign" name="hinting" > <bool>true</bool> </edit> </match> <match target="font" > <edit mode="assign" name="autohint" > <bool>false</bool> </edit> </match> <match target="font" > <edit mode="assign" name="hintstyle" > <const>hintfull</const> </edit> </match> </match> I did set embeddedbitmap=false to reduce the confusion a bit and kept hintstyle=hintfull and hinting=true always. Then I played with the autohint setting. Some results: ---------------------------------------------------------------------- Font "Sazanami Gothic", autohint=false: mfabian@magellan:~/c$ ./bug-246573-test "sazanami gothic-12" complete name=Sazanami Gothic-12:familylang=ar:style=Regular:stylelang=ar:slant=0:weight=100:width=100:pixelsize=16.3419:foundry=unknown:antialias=True:hintstyle=3:hinting=True:verticallayout=False:autohint=False:globaladvance=True:index=0:outline=True:scalable=True:dpi=98.0515:rgba=1:scale=1:minspace=False:fontversion=65536:capability=otlayout\:kana:fontformat=TrueType:embolden=False:embeddedbitmap=False:decorative=False c1=1 width=6 height=13 x=0 y=12 xOff=8 yOff=0 c2=W width=11 height=13 x=1 y=12 xOff=8 yOff=0 hwstr=1234567890 width=81 height=13 x=0 y=12 xOff=80 yOff=0 fwstr=一二三四五六七八九零 width=155 height=16 x=0 y=14 xOff=160 yOff=0 is_double_width_font_xft returns 1 mfabian@magellan:~/c$ Font "Sazanami Gothic", autohint=true: mfabian@magellan:~/c$ ./bug-246573-test "sazanami gothic-12" complete name=Sazanami Gothic-12:familylang=ar:style=Regular:stylelang=ar:slant=0:weight=100:width=100:pixelsize=16.3419:foundry=unknown:antialias=True:hintstyle=3:hinting=True:verticallayout=False:autohint=True:globaladvance=True:index=0:outline=True:scalable=True:dpi=98.0515:rgba=1:scale=1:minspace=False:fontversion=65536:capability=otlayout\:kana:fontformat=TrueType:embolden=False:embeddedbitmap=False:decorative=False c1=1 width=6 height=12 x=-1 y=12 xOff=9 yOff=0 c2=W width=10 height=11 x=1 y=11 xOff=8 yOff=0 hwstr=1234567890 width=85 height=12 x=-1 y=12 xOff=85 yOff=0 fwstr=一二三四五六七八九零 width=155 height=16 x=0 y=14 xOff=160 yOff=0 is_double_width_font_xft returns 0 mfabian@magellan:~/c$ ---------------------------------------------------------------------- Font "MS Gothic": autohint=false: mfabian@magellan:~/c$ ./bug-246573-test "ms gothic-18" complete name=MS Gothic-18:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=24.5129:spacing=0:foundry=ricoh:antialias=True:hintstyle=3:hinting=True:verticallayout=False:autohint=False:globaladvance=False:index=0:outline=True:scalable=True:dpi=98.0515:rgba=1:scale=1:minspace=False:fontversion=196608:capability=otlayout\:kana otlayout\:latn:fontformat=TrueType:embolden=False:embeddedbitmap=False:decorative=False c1=1 width=8 height=20 x=-1 y=20 xOff=13 yOff=0 c2=W width=15 height=20 x=1 y=20 xOff=13 yOff=0 hwstr=1234567890 width=129 height=20 x=-1 y=20 xOff=130 yOff=0 fwstr=一二三四五六七八九零 width=248 height=22 x=0 y=20 xOff=250 yOff=0 is_double_width_font_xft returns 0 mfabian@magellan:~/c$ Font "MS Gothic": autohint=true: mfabian@magellan:~/c$ ./bug-246573-test "ms gothic-18" complete name=MS Gothic-18:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=24.5129:spacing=0:foundry=ricoh:antialias=True:hintstyle=3:hinting=True:verticallayout=False:autohint=True:globaladvance=False:index=0:outline=True:scalable=True:dpi=98.0515:rgba=1:scale=1:minspace=False:fontversion=196608:capability=otlayout\:kana otlayout\:latn:fontformat=TrueType:embolden=False:embeddedbitmap=False:decorative=False c1=1 width=7 height=18 x=-1 y=18 xOff=12 yOff=0 c2=W width=14 height=18 x=1 y=18 xOff=12 yOff=0 hwstr=1234567890 width=119 height=18 x=-1 y=18 xOff=120 yOff=0 fwstr=一二三四五六七八九零 width=245 height=22 x=-1 y=20 xOff=248 yOff=0 is_double_width_font_xft returns 0 mfabian@magellan:~/c$ ---------------------------------------------------------------------- I.e. the widths found in "xOff" may depend on whether the autohinter is used or not. That makes the test return ((2 * gi1.xOff == gi2.xOff) || (gi1.xOff == gi2.xOff)) at the end of is_double_width_font_xft() quite unreliable. As the example with "MS Gothic" shows, it may not work at all no matter whether the autohinter is used or not. It's a bit weird that the autohinter changes the lengths of strings so much. Should the autohinter be allowed to do that? (By the way, that also causes a lot of problems in OpenOffice and it is the reason why OpenOffice currently forces hinting to be off no matter what is in ~/.fonts.conf. The OpenOffice people say that they they get completely different line lengths depending on the hinting settings, therefore they switch hinting off. Of course this annoys some users who don't like the fontrendering results without hinting. But no better solution is known currently). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #44 from mfabian@novell.com 2007-02-22 10:07 MST ------- Created an attachment (id=120606) --> (https://bugzilla.novell.com/attachment.cgi?id=120606&action=view) bug-246573-test.c Test-program to check the widths found by is_double_width_font_xft() and how they are influenced by the hinting settings. Can be compiled like this: gcc -g -O0 -Wall -o bug-246573-test bug-246573-test.c $(shell xft-config --cflags ) $(shell xft-config --libs) -lX11 -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573
mfabian@novell.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wl@gnu.org
------- Comment #45 from mfabian@novell.com 2007-02-23 09:37 MST -------
Adding freetype developer Werner LEMBERG
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #46 from mfabian@novell.com 2007-02-23 10:45 MST ------- Created an attachment (id=120821) --> (https://bugzilla.novell.com/attachment.cgi?id=120821&action=view) xterm-msgothic-msgothic-size-14.png I am still confused what to think about the output of my small test program In the hope to understand it better, I added similar printf statements to the xterm code and tried. A screen shot for a case where it doesn't work well is attached. mfabian@magellan:~$ /abuild/buildsystem.magellan.mfabian/usr/src/packages/BUILD/xterm-224/xterm -fa "MS Gothic" -fd "MS Gothic" -fs 14 -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-14:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=19.0656:spacing=0:foundry=ricoh:antialias=True:hintstyle=3 c1=1 width=5 height=14 x=-1 y=14 xOff=9 yOff=0 c2=W width=10 height=14 x=0 y=14 xOff=9 yOff=0 hwstr=1234567890 width=89 height=14 x=-1 y=14 xOff=90 yOff=0 fwstr=一二三四五六七八九零width=186 height=18 x=-1 y=16 xOff=190 yOff=0 is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-14:familylang=en:style=Regular:stylelang=en:slant=0:weight=200:width=100:pixelsize=19.0656:spacing=0:foundry=ricoh:antialias=True:hintstyle= c1=1 width=6 height=16 x=-1 y=16 xOff=19 yOff=0 c2=W width=11 height=16 x=0 y=16 xOff=19 yOff=0 hwstr=1234567890 width=180 height=16 x=-1 y=16 xOff=190 yOff=0 fwstr=一二三四五六七八九零width=188 height=18 x=-1 y=16 xOff=190 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-14:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=19.0656:spacing=0:foundry=ricoh:antialias=True:hintstyle=3 c1=1 width=5 height=14 x=-1 y=14 xOff=9 yOff=0 c2=W width=10 height=14 x=0 y=14 xOff=9 yOff=0 hwstr=1234567890 width=89 height=14 x=-1 y=14 xOff=90 yOff=0 fwstr=一二三四五六七八九零width=186 height=18 x=-1 y=16 xOff=190 yOff=0 is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-14:familylang=en:style=Regular:stylelang=en:slant=0:weight=200:width=100:pixelsize=19.0656:spacing=0:foundry=ricoh:antialias=True:hintstyle= c1=1 width=6 height=16 x=-1 y=16 xOff=19 yOff=0 c2=W width=11 height=16 x=0 y=16 xOff=19 yOff=0 hwstr=1234567890 width=180 height=16 x=-1 y=16 xOff=190 yOff=0 fwstr=一二三四五六七八九零width=188 height=18 x=-1 y=16 xOff=190 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-14:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=19.0656:spacing=0:foundry=ricoh:antialias=True:hintstyle=3 c1=1 width=5 height=14 x=-1 y=14 xOff=9 yOff=0 c2=W width=10 height=14 x=0 y=14 xOff=9 yOff=0 hwstr=1234567890 width=89 height=14 x=-1 y=14 xOff=90 yOff=0 fwstr=一二三四五六七八九零width=186 height=18 x=-1 y=16 xOff=190 yOff=0 is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-14:familylang=en:style=Regular:stylelang=en:slant=0:weight=200:width=100:pixelsize=19.0656:spacing=0:foundry=ricoh:antialias=True:hintstyle= c1=1 width=6 height=16 x=-1 y=16 xOff=19 yOff=0 c2=W width=11 height=16 x=0 y=16 xOff=19 yOff=0 hwstr=1234567890 width=180 height=16 x=-1 y=16 xOff=190 yOff=0 fwstr=一二三四五六七八九零width=188 height=18 x=-1 y=16 xOff=190 yOff=0 is_double_with_font_xft() returned True mfabian@magellan:~$ -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #47 from mfabian@novell.com 2007-02-23 10:51 MST ------- In the standard output which I pasted into the last comment, I found it strange that xOff is 190 both for hwstr and fwstr when weight=200 (i.e. bold) but xOff=90 for hwstr and xOff=190 for fwstr when weight=80 (i.e. non-bold). Isn't this weird? Of course this font doesn't have a real bold version, thus bold is created by artificial emboldening in Xft. I could maybe understand that artificial emboldening might change the widths slightly, but increading the width of the halfwidth string by a factor of more than 2 just because of weight=200 is really weird, isn't it? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #48 from mfabian@novell.com 2007-02-23 10:55 MST ------- Created an attachment (id=120825) --> (https://bugzilla.novell.com/attachment.cgi?id=120825&action=view) xterm-msgothic-msgothic-size-12.png Here is another screen shot of xterm using size=12 which looks good (not as widely spaced as the last screen shot at size=14 which used the same fonts). Here is the standard output of my debugging printf statements: mfabian@magellan:~$ /abuild/buildsystem.magellan.mfabian/usr/src/packages/BUILD/xterm-224/xterm -fa "MS Gothic" -fd "MS Gothic" -fs 12 -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-12:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=16.3419:spacing=0:foundry=ricoh:antialias=True:hintstyle=3 c1=1 width=5 height=13 x=-1 y=13 xOff=8 yOff=0 c2=W width=8 height=13 x=0 y=13 xOff=8 yOff=0 hwstr=1234567890 width=79 height=13 x=-1 y=13 xOff=80 yOff=0 fwstr=一二三四五六七八九零width=158 height=14 x=-1 y=13 xOff=160 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-12:familylang=en:style=Regular:stylelang=en:slant=0:weight=200:width=100:pixelsize=16.3419:spacing=0:foundry=ricoh:antialias=True:hintstyle= c1=1 width=5 height=13 x=-1 y=13 xOff=16 yOff=0 c2=W width=9 height=13 x=0 y=13 xOff=16 yOff=0 hwstr=1234567890 width=152 height=13 x=-1 y=13 xOff=160 yOff=0 fwstr=一二三四五六七八九零width=158 height=15 x=-1 y=14 xOff=160 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-12:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=16.3419:spacing=0:foundry=ricoh:antialias=True:hintstyle=3 c1=1 width=5 height=13 x=-1 y=13 xOff=8 yOff=0 c2=W width=8 height=13 x=0 y=13 xOff=8 yOff=0 hwstr=1234567890 width=79 height=13 x=-1 y=13 xOff=80 yOff=0 fwstr=一二三四五六七八九零width=158 height=14 x=-1 y=13 xOff=160 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-12:familylang=en:style=Regular:stylelang=en:slant=0:weight=200:width=100:pixelsize=16.3419:spacing=0:foundry=ricoh:antialias=True:hintstyle= c1=1 width=5 height=13 x=-1 y=13 xOff=16 yOff=0 c2=W width=9 height=13 x=0 y=13 xOff=16 yOff=0 hwstr=1234567890 width=152 height=13 x=-1 y=13 xOff=160 yOff=0 fwstr=一二三四五六七八九零width=158 height=15 x=-1 y=14 xOff=160 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-12:familylang=en:style=Regular:stylelang=en:slant=0:weight=80:width=100:pixelsize=16.3419:spacing=0:foundry=ricoh:antialias=True:hintstyle=3 c1=1 width=5 height=13 x=-1 y=13 xOff=8 yOff=0 c2=W width=8 height=13 x=0 y=13 xOff=8 yOff=0 hwstr=1234567890 width=79 height=13 x=-1 y=13 xOff=80 yOff=0 fwstr=一二三四五六七八九零width=158 height=14 x=-1 y=13 xOff=160 yOff=0 is_double_with_font_xft() returned True -------------------------------------------------- font checked in is_double_width_font_xft is: MS Gothic-12:familylang=en:style=Regular:stylelang=en:slant=0:weight=200:width=100:pixelsize=16.3419:spacing=0:foundry=ricoh:antialias=True:hintstyle= c1=1 width=5 height=13 x=-1 y=13 xOff=16 yOff=0 c2=W width=9 height=13 x=0 y=13 xOff=16 yOff=0 hwstr=1234567890 width=152 height=13 x=-1 y=13 xOff=160 yOff=0 fwstr=一二三四五六七八九零width=158 height=15 x=-1 y=14 xOff=160 yOff=0 is_double_with_font_xft() returned True mfabian@magellan:~$ -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #49 from mfabian@novell.com 2007-02-23 10:57 MST ------- In the debug output for the last screen shot you can see that is_double_width_font_xft() always returned true. The width of hwstr was increased by *exactly* a factor of two here for weight=200. Therefore, return ((2 * gi1.xOff == gi2.xOff) || (gi1.xOff == gi2.xOff)); always was true. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #50 from mfabian@novell.com 2007-02-23 11:02 MST ------- Created an attachment (id=120827) --> (https://bugzilla.novell.com/attachment.cgi?id=120827&action=view) xterm-courier-msgothic-size-14.png And one last screen shot showing xterm -fa "Courier" -fd "MS Gothic" -fs 14 Debugging output: mfabian@magellan:~$ /abuild/buildsystem.magellan.mfabian/usr/src/packages/BUILD/xterm-224/xterm -fa "Courier" -fd "MS Gothic" -fs 14 -------------------------------------------------- font checked in is_double_width_font_xft is: Courier-14:style=Regular:slant=0:weight=80:width=100:pixelsize=19.0656:spacing=100:foundry=ibm:antialias=True:hintstyle=3:hinting=True:verticallayout= is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: Courier-14:style=Bold:slant=0:weight=200:width=100:pixelsize=19.0656:spacing=100:foundry=ibm:antialias=True:hintstyle=3:hinting=True:verticallayout=Fa is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: Courier-14:style=Regular:slant=0:weight=80:width=100:pixelsize=19.0656:spacing=100:foundry=ibm:antialias=True:hintstyle=3:hinting=True:verticallayout= is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: Courier-14:style=Bold:slant=0:weight=200:width=100:pixelsize=19.0656:spacing=100:foundry=ibm:antialias=True:hintstyle=3:hinting=True:verticallayout=Fa is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: Courier-14:style=Regular:slant=0:weight=80:width=100:pixelsize=19.0656:spacing=100:foundry=ibm:antialias=True:hintstyle=3:hinting=True:verticallayout= is_double_with_font_xft() returned False -------------------------------------------------- font checked in is_double_width_font_xft is: Courier-14:style=Bold:slant=0:weight=200:width=100:pixelsize=19.0656:spacing=100:foundry=ibm:antialias=True:hintstyle=3:hinting=True:verticallayout=Fa is_double_with_font_xft() returned False mfabian@magellan:~$ -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #51 from mfabian@novell.com 2007-02-23 11:04 MST ------- Here in the last screen shot, is_double_width_font_xft() always returned False because only "Courier" was tested, never "MS Gothic" and "Courier" doesn't have any CJK glyphs, therefore it returns False here: /* Some Korean fonts don't have Chinese characters at all. */ if (!XftCharExists(dpy, font, FULL_WIDTH_CHAR1)) { if (!XftCharExists(dpy, font, FULL_WIDTH_CHAR2)) return False; /* Not a CJK font */ else /* a Korean font without CJK Ideographs */ fwstr = FULL_WIDTH_TEST_STRING2; } -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #52 from mfabian@novell.com 2007-02-23 11:06 MST ------- I still think that is very weird that the width changes so drastically when changing weight=80 to weight=200. Could this be a bug in Xft? Anyway, even if that problem were not there, the check return ((2 * gi1.xOff == gi2.xOff) || (gi1.xOff == gi2.xOff)); would still be unreliable because it seems to depend on the hinting. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #53 from mfabian@novell.com 2007-02-23 11:15 MST ------- I wonder whether it might be a better idea not to check for the widths of strings at all to find out whether a font is double with or not because this check seems to be so unreliable. Instead one could just say that every font which has Chinese or Korean characters is a double with font. Such a font is certainly either a dual width font or a proportional font (it might have proportional Latin characters and/or propoertial Kana (for example "MS PGothic")). In either case I think it might be OK to return true because the font has wide characters. If it happens to be a proportional font, it won't work right of course. But xterm doesn't check for that anyway: xterm -fa arial looks broken but xterm doesn't print any warning. So we probably don't need to check for proportional double width fonts either. If a user specifies xterm -fa "MS PGothic" -fd "MS PGothic" there will be problems just as in the arial case, but that can't be helped. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #54 from mfabian@novell.com 2007-02-23 11:21 MST ------- Created an attachment (id=120831) --> (https://bugzilla.novell.com/attachment.cgi?id=120831&action=view) bug-246573-tentative-patch.patch So what do you think about the attached patch? Could this be a better test for whether a (Xft)-font is double with, although it is much simpler? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #55 from mfabian@novell.com 2007-02-23 17:40 MST ------- Here is a comment by Werner LEMBERG (Werner currently has no reliable internet access and asked me to paste his mail into bugzilla): WL> > Werner, is it correct that the width of strings changes if the WL> > autohinter is used? WL> WL> Yes, of course. This is the same as with TrueType. Just think of the WL> `hdmx' table which caches horizontal metrics for selected ppem values. WL> WL> > As you can see in comment #43 this seems to make it impossible to WL> > check whether "一二三四五六七八九零" is twice as wide as "1234567890" WL> > in xterm because the result may depend on the hinting settings. WL> WL> This is a difficult issue. Because real TrueType fonts have been WL> designed and hinted by humans, the CJK widths don't change even if WL> hinted (in the normal case). However, the autohinter doesn't know WL> this. WL> WL> I see two solutions; none of them is implemented currently. WL> WL> 1. Introduce a user-settable flag FT_FACE_FLAG_DOUBLE_WIDTH which WL> indicates that the font has single and double width characters WL> only. WL> WL> 2. Add some heuristics to both the latin and CJK autohinter (or WL> perhaps even to the general font loading engine of FreeType) WL> which sets the above flag automatically. WL> WL> Handling all CJK characters automatically as fixed-width is probably WL> not a good idea, at least not for the vertical case; there exist WL> Japanese variable-height fonts. However, this might be a workaround WL> until we find a real fix. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573
mfabian@novell.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david@freetype.org
------- Comment #56 from mfabian@novell.com 2007-02-23 17:50 MST -------
Add David Turner
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #57 from dickey@his.com 2007-02-25 16:04 MST ------- Note on #35: agree it would be nice to improve font-loading by not loading a font twice. That was essentially the large patch in #224 for bitmap fonts. The Xft stuff is just glued on - something to rewrite... For #36 - yes, xterm doesn't handle proportional fonts (it uses the maximum cell width). For #53-54, etc - I don't know either. Perhaps you can try the patch for a while on the package and see what issues come up? -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120831|0 |1 is obsolete| | ------- Comment #58 from sndirsch@novell.com 2007-02-26 09:09 MST ------- Created an attachment (id=121101) --> (https://bugzilla.novell.com/attachment.cgi?id=121101&action=view) bug-246573-tentative-patch.diff cleanup -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 sndirsch@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #59 from sndirsch@novell.com 2007-02-26 09:10 MST ------- I now also applied the "bug-246573-tentative-patch.diff" patch. Closing as fixed for now. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #60 from mfabian@novell.com 2007-02-27 04:49 MST ------- Thank you, I've installed the latest xterm from STABLE. Remaining problems are the the redraw problem Thomas Dickey mentioned in comment #32 and a problem when displaying Japanese man-pages which might be related to the redraw problem. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #61 from mfabian@novell.com 2007-02-27 04:58 MST ------- Created an attachment (id=121266) --> (https://bugzilla.novell.com/attachment.cgi?id=121266&action=view) xterm-less-japanese.png A screen shot of “less yuki.utf-8” running in a xterm (“yuki.utf-8” is just a test file containing UTF-8 encoded Japanese). Here I can already see the same brokenness as in Japanese man-pages. as “man” uses “less” as the default pager, it is no wonder one sees the same problem when using man. This problem happens already without triggering a redraw of the xterm window, nevertheless I guess it is related to the redraw problem. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #62 from dickey@his.com 2007-02-27 18:30 MST ------- It might be in the same general area (I made a fix for the redraw on Sunday, which is part of the xterm-224b.patch.gz file in ftp://invisible-island.net/temp). Essentially the reason for the redraw bug was not handling properly the 0xffff's used for padding cells which do not start a multicolumn character. I have some other fixes in my to-do list (have been also working on dialog - released new version tonight, so I should be able to focus on xterm over the next few days). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #63 from mfabian@novell.com 2007-03-22 11:36 MST ------- Thomas, I have now tried your latest patch ftp://invisible-island.net/temp/xterm-224i.patch.gz It fixes the redraw problem indeed. And it also fixes the problem I reported in comment #61. Japanese man pages display fine now. I had to edit your patch slightly to make it build because we use the configure option --with-utempter: --- /tmp/xterm-224i.patch 2007-03-22 18:15:34.000000000 +0100 +++ xterm-224i.patch 2007-03-22 18:13:30.000000000 +0100 @@ -9706,7 +9706,7 @@ +#if !defined(DISABLE_SETUID) setEffectiveUser(save_euid); +#endif -+#if !defined(DISABLE_SETGID) ++#if !defined(DISABLE_SETGID) && !defined(USE_UTEMPTER) setEffectiveGroup(save_egid); +#endif TRACE_IDS; I am not sure whether this is the the correct way to fix the build problem, I looked at the #if statements around the implementation of setEffectiveGroup() and setEffectiveUser() in main.c and became a bit confused whether these are correct or not. If they are correct, then the way I edited the patch might be correct as well because there is a “&& !defined(USE_UTEMPTER)” around the implementation of setEffectiveGroup(). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=246573 ------- Comment #64 from dickey@his.com 2007-03-22 13:24 MST ------- yes - there's a problem with the ifdef's. I ran into a related problem last night while doing regression builds for #225, and that area is what I'm working on today. (If I don't find new issues, that'll be it for #225). -- 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.
participants (1)
-
bugzilla_noreply@novell.com