Emacs Unicode branch 中文输入 bug

版本是 GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2007-11-26 on $HOST_NAME,上次更新以后似乎一直没有用过中文,然后周末的时候写 blog 用到了,立刻就发现一个问题:用输入法输入标点符号以后什么都输入不进去了,不管是中文标点还是英文标点都不行。随便打一个字符,然后不选字直接删除,再重新输入就可以了,非常得不方便。换输入法也不行,而在别的应用程序里面都是可以的。而今天更新的编译通不过,说什么 syms_of_font not found,但我发现是在 fonts.c 里的,没时间仔细看了,先写下来吧。

Help for syms_of_font not found issue

Hi, I am compiling latest emacs cvs, and found "syms_of_font not found" issue. Did you solve it?

似乎搞定了

在 configure 的时候加上 --enable-font-backend 的选项,然后编译可以通过,但是以前用的字体设置都不能再使用。应该使用跟 Linux 下同样的方法,在 .emacs 中加入:

  1. (set-default-font "DejaVu Sans Mono-10")
  2. (set-fontset-font (frame-parameter nil 'font)
  3.   'han '("SimSun" . "unicode-bmp"))

但是另外一个问题是,我的环境都是 GBK,在使用 C-u C-x = 查看中文字信息的时候字体名字是乱码:

  1.         character: 中 (20013, #o47055, #x4e2d)
  2. preferred charset: chinese-gbk (GBK Chinese simplified.)
  3.        code point: 0xD6D0
  4.            syntax: w    which means: word
  5.          category: C:Chinese (Han) characters of 2-byte character sets c:Chinese h:Korean j:Japanese
  6.                    |:While filling, we can break a line at this character.
  7.       buffer code: #xE4 #xB8 #xAD
  8.         file code: #xD6 #xD0 (encoded by coding system chinese-gbk-unix)
  9.           display: by this font (glyph code)
  10.      <span style="font-weight:bold">ËÎÌå</span> (#x4E2D)
  11.  
  12. Character code properties are not shown: customize what to show
  13.  
  14. There are text properties here:
  15.   auto-composed        t
  16.   fontified            t

感觉上中文字体似乎不太对,不是宋体的样子。整个如图所示:


老的 Emacs,没有使用 font backend

使用了 font backend 的新 Emacs

性能问题

在 win32 上“--enable-font-backend”以后,性能很差,在后来 emacs-unicode-2 branch 合并到 HEAD 以后,有所改进,但还是能察觉出来。更好的是不加这个选项也能编译通过,所以就重新编译,可以跟以前一样使用了。用的是 Windows 自己的字体平滑选项。

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
  _                 _       _   _____           _____         
| |_ __ _ | | __| | | ___| __ _ | ____| _ _
| __| / _` | _ | | / _` | | |_ / _` | | _| | | | |
| |_ | (_| | | |_| | | (_| | | _| | (_| | | |___ | |_| |
\__| \__, | \___/ \__,_| |_| \__, | |_____| \__, |
|___/ |___/ |___/
Enter the code depicted in ASCII art style.