页次: 1
正常情况下中文显示这是样的:
屏幕刷新后(比如切到另一个工作区再切回来),每个汉字就这样变成了三个单字符宽:
回滚到 xterm-325 没有个这问题。附上xterm的字体设置
XTerm*locale: zh_CN.UTF-8
xterm*utf8: true
xterm*utf8Title: true
xterm*fontMenu*fontdefault*Label: Default
xterm*faceName: DejaVu Sans Mono:antialias=true:pixelsize=16
xterm*faceNameDoublesize: 微软雅黑:antialias=true:pixelsize=17
xterm*xftAntialias:true
xterm*cjkWidth:false
离线
在 debian stretch 上编译官网的 XTerm(326) 可以重现
XTerm(326) changelog http://invisible-island.net/xterm/xterm … #xterm_326
diff -u xterm-325/ xterm-326/
http://paste.ubuntu.com/23268171/
最近编辑记录 vickycq (2016-10-03 09:38:04)
老师你说我能考上什么,我说你只要学前途无量,他说:我也是这么想的
你已经掉到一半了,你大喊一声:“老师,我写跑题了。”
你不能说我的幸福就是苏轼如何如何
离线
貌似是这条改动引起的
amend fix for Debian #738794 to restore a check for missing characters which are not combining characters. Also fill in a corresponding special case for TrueType fonts (Debian #827905).
具体是此处改动引起的
diff -u xterm-325/util.c xterm-326/util.c
--- xterm-325/util.c 2016-06-03 16:58:37.000000000 +0800
+++ xterm-326/util.c 2016-09-24 21:39:04.000000000 +0800
@@ -1,4 +1,4 @@
-/* $XTermId: util.c,v 1.688 2016/06/03 08:58:37 tom Exp $ */
+/* $XTermId: util.c,v 1.691 2016/09/24 13:39:04 tom Exp $ */
/*
* Copyright 1999-2015,2016 by Thomas E. Dickey
@@ -3309,6 +3309,10 @@
}
#endif
+#define SetMissing() \
+ TRACE(("%s@%d: missing %d\n", __FILE__, __LINE__, missing)); \
+ missing = 1
+
/*
* Draws text with the specified combination of bold/underline. The return
* value is the updated x position.
@@ -3538,7 +3542,7 @@
*/
if (screen->force_box_chars
|| xtermXftMissing(xw, currFont, dec2ucs(ch))) {
- missing = 1;
+ SetMissing();
} else {
ch = dec2ucs(ch);
replace = True;
@@ -3555,7 +3559,7 @@
if (screen->force_box_chars
|| xtermXftMissing(xw, currFont, ch)) {
ch = part;
- missing = True;
+ SetMissing();
}
} else if (xtermXftMissing(xw, currFont, ch)) {
XftFont *test = pickXftFont(needed, font0, wfont0);
@@ -3567,6 +3571,8 @@
filler = needed - 1;
ch = part;
replace = True;
+ } else {
+ SetMissing();
}
}
});
@@ -3582,7 +3588,7 @@
* box-characters.
*/
if (xtermXftMissing(xw, currFont, ch)) {
- missing = 1;
+ SetMissing();
}
}
#endif
@@ -3756,10 +3762,11 @@
&& (!screen->fnt_boxes
|| (FontIsIncomplete(curFont) && !screen->assume_all_chars)
|| screen->force_box_chars)) {
- /* Fill in missing box-characters.
- Find regions without missing characters, and draw
- them calling ourselves recursively. Draw missing
- characters via xtermDrawBoxChar(). */
+ /*
+ * Fill in missing box-characters. Find regions without missing
+ * characters, and draw them calling ourselves recursively. Draw
+ * missing characters via xtermDrawBoxChar().
+ */
int last, first = 0;
Bool drewBoxes = False;
@@ -3827,6 +3834,8 @@
#if OPT_WIDE_CHARS
if (ch_width <= 0 && ch < 32)
ch_width = 1; /* special case for line-drawing */
+ else if (ch_width < 0)
+ ch_width = 1; /* special case for combining char */
if (!ucs_workaround(xw, ch,
attr_flags,
draw_flags,
@@ -4839,7 +4848,7 @@
|| (x_strcasecmp(value, "off") == 0)) {
result = False;
} else if ((check = strtol(value, &next, 0)) >= 0 && *next == '\0') {
- if (check >= (long) limit)
+ if (check >= (long) (limit + 2)) /* 2 is past False=0, True=1 */
check = True;
result = (int) check;
} else {
老师你说我能考上什么,我说你只要学前途无量,他说:我也是这么想的
你已经掉到一半了,你大喊一声:“老师,我写跑题了。”
你不能说我的幸福就是苏轼如何如何
离线
一样,回滚325了。
离线
327修复了
Patch #327 - 2016/10/07
amend fix from patch #326 for TrueType fonts to exclude the hidden character used for double-width cells (report by Grady Martin).
离线
页次: 1