unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* chinese font setup problem
@ 2008-02-20  7:56 William Xu
  2008-02-20 10:45 ` Zhang Wei
  0 siblings, 1 reply; 9+ messages in thread
From: William Xu @ 2008-02-20  7:56 UTC (permalink / raw)
  To: emacs-devel

I try to setup chinese fonts display.  Start emacs23 with `-Q', all
chinese fonts are displayed hollow boxes:

,----[ C-u C-x = ]
|         character: 华 (21326, #o51516, #x534e)
| preferred charset: chinese-gbk (GBK Chinese simplified.)
|        code point: 0xBBAA
|            syntax: w 	which means: word
|          category: C:Chinese (Han) characters of 2-byte character sets
| 		   c:Chinese
| 		   |:While filling, we can break a line at this character.
|       buffer code: #xE5 #x8D #x8E
|         file code: #xE5 #x8D #x8E (encoded by coding system utf-8-unix)
|           display: by this font (glyph code)
|      -wenquanyi-wenquanyi bitmap song-medium-r-normal--17-123-100-100-p-160-iso10646-1 (#xBBAA)
| 
| Character code properties are not shown: customize what to show
| 
| There are text properties here:
|   auto-composed        t
|   fontified            t
| 
| [back]       
`----

Compared with emacs22, also with `-Q', chinese fonts are displayed
correctly, for example: 

,----
|   character: 华 (40362, #o116652, #x9daa, U+534E)
|     charset: chinese-gb2312 (GB2312 Chinese simplified: ISO-IR-58.)
|  code point: #x3B #x2A
|      syntax: w 	which means: word
|    category: C:Chinese (Han) characters of 2-byte character sets c:Chinese
| 	     |:While filling, we can break a line at this character.
| buffer code: #x91 #xBB #xAA
|   file code: #xE5 #x8D #x8E (encoded by coding system mule-utf-8)
|     display: by this font (glyph code)
|      -arphic-ar pl sungtil gb-medium-r-normal--18-180-72-72-c-179-gb2312.1980-0 (#x3B2A)
| 
| There are text properties here:
|   fontified            t
| 
| [back]
`----

In emacs23, using `M-x set-default-font', I have tried various chinese
fonts, but it could never display chinese fonts correctly.  Any ideas?

,----[ M-x emacs-version ]
| GNU Emacs 23.0.60.4 (i686-pc-linux-gnu) of 2008-02-19 on debian
`----

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-20  7:56 chinese font setup problem William Xu
@ 2008-02-20 10:45 ` Zhang Wei
  2008-02-20 11:10   ` William Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Zhang Wei @ 2008-02-20 10:45 UTC (permalink / raw)
  To: emacs-devel

William Xu <william.xwl <at> gmail.com> writes:
 
> I try to setup chinese fonts display.  Start emacs23 with `-Q', all
> chinese fonts are displayed hollow boxes:

What do you get with `xlsfonts | grep gbk'? Do you have any font with the
`gbk-0' encoding? If not, go to your chinese font directory and issue these
commands:

mkfontscale -a gbk-0
mkfontdir







^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-20 10:45 ` Zhang Wei
@ 2008-02-20 11:10   ` William Xu
  2008-02-21  2:59     ` Zhang Wei
  0 siblings, 1 reply; 9+ messages in thread
From: William Xu @ 2008-02-20 11:10 UTC (permalink / raw)
  To: emacs-devel

Zhang Wei <id.brep@gmail.com> writes:

> What do you get with `xlsfonts | grep gbk'? Do you have any font with the
> `gbk-0' encoding?

Yes.

,----[ xlsfonts | grep gbk ]
| -wenquanyi-wenquanyi bitmap song-bold-r-normal--0-0-100-100-p-0-gbk-0
| -wenquanyi-wenquanyi bitmap song-bold-r-normal--0-0-75-75-p-0-gbk-0
| -wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-100-100-p-0-gbk-0
| -wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-gbk-0
`----

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-20 11:10   ` William Xu
@ 2008-02-21  2:59     ` Zhang Wei
  2008-02-21  4:00       ` William Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Zhang Wei @ 2008-02-21  2:59 UTC (permalink / raw)
  To: emacs-devel

William Xu <william.xwl <at> gmail.com> writes:

> 
> Zhang Wei <id.brep <at> gmail.com> writes:
> 
> > What do you get with `xlsfonts | grep gbk'? Do you have any font with the
> > `gbk-0' encoding?
> 
> Yes.
> 
> ,----[ xlsfonts | grep gbk ]
> | -wenquanyi-wenquanyi bitmap song-bold-r-normal--0-0-100-100-p-0-gbk-0
> | -wenquanyi-wenquanyi bitmap song-bold-r-normal--0-0-75-75-p-0-gbk-0
> | -wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-100-100-p-0-gbk-0
> | -wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-gbk-0
> `----
> 

Can't reproduce the bug. 
Did your emacs bootstraped with `--enable-font-backend'? 
What's your locale and language configuration?






^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-21  2:59     ` Zhang Wei
@ 2008-02-21  4:00       ` William Xu
  2008-02-21 11:07         ` Zhang Wei
  0 siblings, 1 reply; 9+ messages in thread
From: William Xu @ 2008-02-21  4:00 UTC (permalink / raw)
  To: emacs-devel

Zhang Wei <id.brep@gmail.com> writes:

> Can't reproduce the bug. 

Hmm...what is your build version?

> Did your emacs bootstraped with `--enable-font-backend'? 

No. configured only with `--prefix=$HOME'.

> What's your locale and language configuration?

,----[ locale ]
| LANG=zh_CN.UTF-8
| LANGUAGE=
| LC_CTYPE="zh_CN.UTF-8"
| LC_NUMERIC="zh_CN.UTF-8"
| LC_TIME="zh_CN.UTF-8"
| LC_COLLATE="zh_CN.UTF-8"
| LC_MONETARY="zh_CN.UTF-8"
| LC_MESSAGES="zh_CN.UTF-8"
| LC_PAPER="zh_CN.UTF-8"
| LC_NAME="zh_CN.UTF-8"
| LC_ADDRESS="zh_CN.UTF-8"
| LC_TELEPHONE="zh_CN.UTF-8"
| LC_MEASUREMENT="zh_CN.UTF-8"
| LC_IDENTIFICATION="zh_CN.UTF-8"
| LC_ALL=
`----

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-21  4:00       ` William Xu
@ 2008-02-21 11:07         ` Zhang Wei
  2008-02-21 11:47           ` William Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Zhang Wei @ 2008-02-21 11:07 UTC (permalink / raw)
  To: emacs-devel

William Xu <william.xwl <at> gmail.com> writes:

[...]

> Hmm...what is your build version?

In GNU Emacs 23.0.60.9 (i686-pc-linux-gnu, GTK+ Version 2.12.5)
 of 2008-02-17 on debian
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--enable-font-backend''

brep@debian:~$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

 
> > Did your emacs bootstraped with `--enable-font-backend'? 
> 
> No. configured only with `--prefix=$HOME'.
> 
> > What's your locale and language configuration?
> 
> ,----[ locale ]
> | LANG=zh_CN.UTF-8
[...] 

I build a version without `enable-font-backend', 
but still can't reproduce the bug.

Do you have any truetype chinese font installed beside 
the wenquanyi bitmap font?







^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-21 11:07         ` Zhang Wei
@ 2008-02-21 11:47           ` William Xu
  2008-02-21 14:32             ` Zhang Wei
  0 siblings, 1 reply; 9+ messages in thread
From: William Xu @ 2008-02-21 11:47 UTC (permalink / raw)
  To: emacs-devel

Zhang Wei <id.brep@gmail.com> writes:

> I build a version without `enable-font-backend', 
> but still can't reproduce the bug.

It looks like there is a difference on which x-toolkit is configed to
use.  Mine is none. Not sure whether this matters.

> Do you have any truetype chinese font installed beside 
> the wenquanyi bitmap font?

Seems not.  But there are some other chinese fonts available: 

,----
| -default-song-medium-r-normal--8-80-72-72-m-80-iso10646-1
| -default-song-medium-r-normal--8-80-72-72-m-80-iso8859-1
| -isas-fangsong ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
| -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
| -isas-song ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
| -isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
| -isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0
`----

Do you think this is a font missing problem? I don't understand, since
emacs22 on the same system can display chinese texts correctly.

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-21 11:47           ` William Xu
@ 2008-02-21 14:32             ` Zhang Wei
  2008-02-22  6:55               ` William Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Zhang Wei @ 2008-02-21 14:32 UTC (permalink / raw)
  To: emacs-devel

William Xu <william.xwl <at> gmail.com> writes:

[...]
> Do you think this is a font missing problem? I don't understand, since
> emacs22 on the same system can display chinese texts correctly.

I build a version without font-backend, and installed the xfonts-wqy package of
debian sid, and use the following configuration:

(set-fontset-font "fontset-default" 'gb18030
"-wenquanyi-wenquanyi bitmap 
song-medium-r-normal--16-160-75-75-p-80-iso10646-1")

Emacs display chinese characters with wenquanyi font with no problem.

This problem is quite weird.







^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: chinese font setup problem
  2008-02-21 14:32             ` Zhang Wei
@ 2008-02-22  6:55               ` William Xu
  0 siblings, 0 replies; 9+ messages in thread
From: William Xu @ 2008-02-22  6:55 UTC (permalink / raw)
  To: emacs-devel

Zhang Wei <id.brep@gmail.com> writes:

> I build a version without font-backend, and installed the xfonts-wqy package of
> debian sid, and use the following configuration:
>
> (set-fontset-font "fontset-default" 'gb18030
> "-wenquanyi-wenquanyi bitmap 
> song-medium-r-normal--16-160-75-75-p-80-iso10646-1")
>
> Emacs display chinese characters with wenquanyi font with no problem.

Ah, set-fontset-font also works here.  `M-x set-default-font' won't.
There seems to be some differences between these two then.

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-02-22  6:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20  7:56 chinese font setup problem William Xu
2008-02-20 10:45 ` Zhang Wei
2008-02-20 11:10   ` William Xu
2008-02-21  2:59     ` Zhang Wei
2008-02-21  4:00       ` William Xu
2008-02-21 11:07         ` Zhang Wei
2008-02-21 11:47           ` William Xu
2008-02-21 14:32             ` Zhang Wei
2008-02-22  6:55               ` William Xu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).