[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
先頭に空行のある xbm イメージ
- X-ml-count: 4925
- Subject: 先頭に空行のある xbm イメージ
- From: ari@xxxxxxxxxxxxxxxx (ARISAWA Akihiro)
- Date: Wed, 17 Dec 2003 18:08:11 +0900
- User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.1 (i386-mingw-nt5.0.2195)
xbm 形式のイメージの先頭に空行があると、正しく画像が表示されません。
例えば、以下の式を評価した時に、X 上の Emacs21 では期待通りの画像が
表示されるのですが、Meadow-2.00b2 では豆腐になってしまいます。
環境は Netinstall の最新版(Meadow.exe-20031202-1, imagemagick-5.5.3-Q16-3)
です。
;; ImageMagick の問題 or 仕様な気がしますが…。
(progn
(pop-to-buffer (get-buffer-create "*TEST*"))
(erase-buffer)
(insert "_")
(put-text-property 1 2 'display
'(image :type xbm :data "
#define default_width 16
#define default_height 16
static unsigned char default_bits[] = {
0x00, 0x00, 0xff, 0x7f, 0x01, 0x40, 0xe1, 0x47, 0x11, 0x44, 0x19, 0x42,
0x25, 0x41, 0xc1, 0x40, 0x41, 0x40, 0xf1, 0x4f, 0x29, 0x48, 0x25, 0x48,
0x21, 0x48, 0xe1, 0x4f, 0x01, 0x40, 0xff, 0x7f};
$=" :ascent center)))
ちなみに、これが原因で lookup での ndtpd の外字イメージ表示ができず、
ndtp.el を変更することで対処しています。
--
有沢 明宏Index: edict-devel/lookup-1/lisp/ndtp.el
===================================================================
RCS file: /circus/cvsroot/edict-devel/lookup-1/lisp/ndtp.el,v
retrieving revision 1.2
diff -u -r1.2 ndtp.el
--- edict-devel/lookup-1/lisp/ndtp.el 4 Oct 2002 02:51:10 -0000 1.2
+++ edict-devel/lookup-1/lisp/ndtp.el 17 Dec 2003 06:40:53 -0000
@@ -262,8 +262,8 @@
(with-current-buffer buffer
(goto-char (point-min))
(if (re-search-forward (format "^$=%s$" code) nil t)
- (buffer-substring (point) (or (search-forward "$=" nil t)
- (point-max))))))))
+ (buffer-substring (1+ (point)) (or (search-forward "$=" nil t)
+ (point-max))))))))
;;;