I have used the following font specification for years, it used to
works fine:

--8<---------------cut here---------------start------------->8---
(create-fontset-from-fontset-spec
 (concat
  "-adobe-courier-medium-r-normal--14-140-75-75-m-90-fontset-courier,"
  "chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gb2312*-*,"
  "mule-unicode-0100-24ff:-*-simsun-medium-r-*-*-14-*-*-*-c-*-iso10646*-*,"
  "chinese-big5-1:-*-simsun-medium-r-*-*-14-*-*-*-c-*-big5*-*,"
  "chinese-big5-2:-*-simsun-medium-r-*-*-14-*-*-*-c-*-big5*-*"))
(set-default-font "fontset-courier")
--8<---------------cut here---------------end--------------->8---

But there must be something changed in the past several months (I shift
to emacs-unicode-2 for several months), those font specification don't
work anymore. To get the same effect as before, now I have to do this:

--8<---------------cut here---------------start------------->8---
(setq ascii-font "-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1")
(setq chinese-font "-sim-simsun-medium-r-normal--16-0-0-0-m-0-iso10646-1")

(defun zw-set-font (en-font cn-font)
  (create-fontset-from-fontset-spec
   (replace-regexp-in-string "iso8859-1" "fontset-zw" en-font))
  (setq cn-font (substring cn-font 0 (string-match "iso10646-1" cn-font)))
  (dolist (fnset '("fontset-default" "fontset-zw"))
    (set-fontset-font fnset 'chinese-gb2312 (concat cn-font "gb2312.1980-0"))
    (set-fontset-font fnset 'mule-unicode-0100-24ff (concat cn-font 
"iso10646-1"))
    (set-fontset-font fnset 'chinese-big5-1 (concat cn-font "big5-0"))
    (set-fontset-font fnset 'chinese-big5-2 (concat cn-font "big5-0")))
  (set-default-font "fontset-zw"))

(zw-set-font ascii-font chinese-font)
--8<---------------cut here---------------end--------------->8---

And it's quite strange I can't use the character "*" in font
specification anymore, any apperence of "*" will defeat the font
setting, I have to use almost exactly the same string as what I get
from `xlsfonts', only to change the font size field from "0" to "14"
for example, otherwise it won't take effect.  still strange is even if
I set font like this, `M-x describe-fontset' <RET> <RET> still reports
I'm using "fontset-default":

--8<---------------cut here---------------start------------->8---
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
CHARSET or CHAR RANGE   FONT NAME
---------------------   ---------
ascii                   
-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1
     [-Adobe-Helvetica-Bold-R-Normal--20-140-100-100-P-105-ISO8859-1]
     [-misc-dejavu sans mono-bold-r-normal--14-105-95-96-m-80-iso8859-1]
     [-Adobe-Helvetica-Bold-R-Normal--14-100-100-100-P-82-ISO8859-1]
     [-Adobe-Helvetica-Bold-R-Normal--24-240-75-75-P-138-ISO8859-1]
     [-misc-dejavu sans mono-bold-o-normal--14-105-95-96-m-80-iso8859-1]
     [-misc-dejavu sans mono-medium-r-normal--14-105-95-96-m-80-iso8859-1]
latin-iso8859-1         -*-iso8859-1
latin-iso8859-2         -*-iso8859-2
latin-iso8859-3         -*-iso8859-3
latin-iso8859-4         -*-iso8859-4
thai-tis620             -*-*-*-tis620-*
greek-iso8859-7         -*-iso8859-7
arabic-iso8859-6        -*-iso8859-6
hebrew-iso8859-8        -*-iso8859-8
katakana-jisx0201       -*-jisx0201-*
latin-jisx0201          -*-jisx0201-*
cyrillic-iso8859-5      -*-iso8859-5
latin-iso8859-9         -*-iso8859-9
latin-iso8859-15        -*-iso8859-15
latin-iso8859-14        -*-iso8859-14
japanese-jisx0208-1978  -*-jisx0208.1978-*
chinese-gb2312          -sim-simsun-medium-r-normal--16-0-0-0-m-0-gb2312.1980-0
japanese-jisx0208       -*-jisx0208.1990-*
korean-ksc5601          -*-ksc5601.1989-*
japanese-jisx0212       -*-jisx0212-*
chinese-cns11643-1      -*-cns11643.1992-1
chinese-cns11643-2      -*-cns11643.1992-2
japanese-jisx0213-1     -*-jisx0213.2000-1
chinese-big5-1          -sim-simsun-medium-r-normal--16-0-0-0-m-0-big5-0
chinese-big5-2          -sim-simsun-medium-r-normal--16-0-0-0-m-0-big5-0
chinese-sisheng         -*-sisheng_cwnn-*
ipa                     -*-muleipa-*

[...]
--8<---------------cut here---------------end--------------->8---

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/home/brep/ex/emacs-gtk/share/emacs/22.0.91/etc/DEBUG for instructions.


In GNU Emacs 22.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2006-11-22 on emacsfans.org
X server distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--prefix=/home/brep/ex/emacs-gtk' '--with-gtk' 
'CFLAGS=-g''

Important settings:
  value of $LC_ALL: zh_CN.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: zh_CN.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<tab> <down> <tab> <down> <tab> <down> <tab> <down> 
<tab> <down> <tab> <down> <tab> <down> <tab> <up> <up> 
<up> <up> C-a C-k C-k C-k C-k C-k C-k C-k C-k <tab> 
C-e <return> <up> <up> C-e ) <down> <return> <up> C-e 
<backspace> <tab> <up> <up> <up> C-a C-k C-k C-k C-k 
C-k C-p C-e ) ) <down> C-k C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> M-x 
r e p o r t - e m <tab> <return>

Recent messages:
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
Loading emacsbug...done
Loading hippie-exp...done





_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to