[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: title bar can't show chinese



On 17/09/2020 10:16, Long Wind wrote:
firefox can show chinese page except in title bar(though in each tab's window, title is correctly shown)
i use twm and below is option in /etc/X11/twm/system.twmrc
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
i delete line above, it doesn't help
both stretch and buster have this problem

twm is ancient, so you have to specify an X11 bitmap font with Chinese language support. Consider using a window manager with scalable font support (this is what Firefox uses to draw its content). Xfce is a popular and lightweight choice. But twm can be made to work:

I copied the system twmrc to ~/.twmrc and edited the TitleFont line to:

TitleFont "hanzigb16fs"

and then restarted twm. The Firefox window title was then displayed in Chinese for a Chinese language page. In fact, all window titles were displayed in Chinese.

Tested with debian-live-10.3.0-amd64-xfce.iso under QEMU with locale zh_CN.UTF-8 set with "dpgk-reconfigure locales" and twm manually installed.

Here are a few Chinese bitmap fonts installed by default:

$ xlsfonts | grep gb2312
-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

These three are aliases for the three fonts above without --0-0 in their names

$ xlsfonts | grep hanzigb
hanzigb16fs
hanzigb16st
hanzigb24st

Kind regards,

--
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand


Reply to: