Subject: 23.1.93; cursor movement in Korean text is slow with xfonts-baekmuk

From: Jae-hyeon Park <[email-masked]>
Date: Mon, 01 Mar 2010 23:14:56 +0100

I am sorry if you are seeing this report more than once as I have
already posted about this problem to emacs-devel (which I suppose was
not the right list for a bug report).

I use the baekmuk bitmap font (available as the xfonts-baekmuk package
in debian for instance) to display Korean characters in emacs.  When
there are many Korean characters in a buffer, moving the cursor among
the Korean characters takes a long time (like a few seconds on my laptop
which is a fairly new hardware).  It is weird that this symptom occurs
only if I use this particular font.  However, the same font causes no
trouble when I am using emacs 22.

How to reproduce:

1) Start emacs with

    $ emacs -Q -xrm 'Emacs.FontBackend: x' &

2) In the scratch buffer, evaluate the following code

    (create-fontset-from-fontset-spec
     "-misc-fixed-medium-r-normal--15-140-75-75-c-90-fontset-baekmuk,
      ascii:-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1")
    (set-fontset-font "fontset-baekmuk" 'korean-ksc5601
     "-baekmuk-gulim-medium-r-normal--18-180-75-75-m-180-ksc5601.1987-0")
    (set-frame-font "fontset-baekmuk")

3) In the same frame, fill a whole emacs window with Korean characters.
   For instance, open the sample Korean text file that can be downloaded
   from https://bugs.launchpad.net/bugs/471597.

4) Try to move the cursor downwards by pressing C-n several times

In GNU Emacs 23.1.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.3)
 of 2010-03-01 on aida
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--enable-profiling' '--with-xpm=no' '--with-gif=no' '--with-tiff=no''

Important settings:
  value of $LC_ALL: nil
  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: en_US.UTF-8
  value of $XMODIFIERS: @im=uim
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down-mouse-2> <mouse-2> <backspace> C-j M-x s e t 
- v a <tab> <return> m a i l - s p e <tab> <return> 
t <return> <down-mouse-1> <mouse-1> C-h v m e s s a 
g e <tab> C-g C-h v m a i l - s p e <tab> <return> 
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <se
nd-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Loading sendmail...done
Making completion list...
Quit
Type C-x 1 to delete the help window, C-M-v to scroll help.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util
hashcash mail-utils emacsbug pp help-mode view cus-edit easymenu
wid-edit sendmail regexp-opt cus-start cus-load help-fns tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)