Unix にある banner コマンドの移植です。
BDF フォントさえあれば日本語だろうが AA だろうが巨大にできます。
NetInstaller でインストールした場合は 3 以降を、
NetInstaller + ni-autoload
を使っている人は 4 以降で OK です。
アーカイブをダウンロードします。
<URL:http://miyamuko.s56.xrea.com/xyzzy/archives/banner.zip>
~/.xyzzy または $XYZZY/site-lisp/siteinit.l に以下のコードを追加します。
;; banner (require "banner")
設定を反映させるため xyzzy を再起動してください。
※siteinit.l に記述した場合には再ダンプが必要です。
banner str)
banner-region start end)
ed::banner-internal str &optional formatter)
指定された文字列を大きくして *banner-output-buffer-name* に 出力します。
省略可能な第2引数には以下の出力関数を指定します。
デフォルトは ed::banner-output-horizontally
です。
ed::banner-output-vertically glyphs)
ed::banner-internal
の引数に指定します。ed::banner-output-horizontally glyphs)
ed::banner-internal
の引数に指定します。*bdf-directory-list*
BDF フォントを置いておくディレクトリを指定します。 デフォルトは $XYZZY/fonts/bdf です。
;; Meadow さんの font directory を追加 (pushnew "D:/Tools/Meadow/fonts/bdf" *bdf-directory-list*)
*banner-output-buffer-name*
*banner-font-fg-char*
*banner-font-bg-char*
それぞれフォントを形成する文字と背景を設定します。
;; 四角でレイアウトする (setf *banner-font-fg-char* "■") (setf *banner-font-bg-char* "□")
こうなる
□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□ ■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□ ■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□ ■□■■□□□■■■□□■□■■□□■□■■□□□■■■□□■□■□ ■■□□■□■□□□■□■■□□■□■■□□■□■□□□■□■■□□ ■□□□■□□□□■■□■□□□■□■□□□■□■□□□■□■□□□ ■□□□■□□■■□■□■□□□■□■□□□■□■■■■■□■□□□ ■□□□■□■□□□■□■□□□■□■□□□■□■□□□□□■□□□ ■■□□■□■□□■■□■□□□■□■□□□■□■□□□■□■□□□ ■□■■□□□■■□■□■□□□■□■□□□■□□■■■□□■□□□ □□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□
*banner-bdf-font-selecter*
ある文字に対応する BDF フォントのファイル名を返す 関数を設定します。
この変数は必ず設定してください。
;; monafont を利用する (setf *banner-bdf-font-selecter* #'(lambda (c) (cond ((kanji-char-p c) ; 漢字、ひらがな、カタカナ "monak12.bdf") ((kana-char-p c) ; いわゆる半角カナ "mona6x12r.bdf") (t ; その他 "mona6x12a.bdf")))) ;; K12 を利用する (setf *banner-bdf-font-selecter* #'(lambda (c) (cond ((kanji-char-p c) ; 漢字、ひらがな、カタカナ "k12x10.bdf") (t ; その他 "k6x10.bdf"))))
フォントをころころ変えたい場合はキャッシュも消したほうがいいです。
; キャッシュを消す (setf ed::*bdf-glyph-cache* nil)
banner は修正 BSD ライセンスに基づいて利用可能です。
Copyright (C) 2003-2004 MIYAMUKO Katsuyuki. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. 2 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.