How to install Goby

Installing Goby

First of all, use Emacs 22 or later.

Unpack goby-ver.tar.gz and do the followings. Emacs Lisp codes will be byte-compiled and installed.

% make
% su
# make install

If you wan to instal Goby other than /usr/local, specify PREFIX as follows:

# make install PREFIX=/usr/pkg

Configuring “.emacs”

Put the following to your “.emacs”.

(autoload 'goby "goby" nil t)

That’s it for MacOS X. (If you want to use images on MacOS X, install “netpbm” also. If you configure goby-window-manager-view-top-position, View mode can occupy the sreen as high as possible.)

On Unix, you should specify the name of TrueType font in your “.emacs”. You can find fonts.dir in a directory specified in FontPath of XF86Config. Look at fonts.dir, know family names and specify them. You should NOT use very long X font names.

An example for Luxi fonts, which is included in XFree86: (Glyph of Luxi fonts is different from that of PostScript fonts. So, I don’t recommend Luxi if you want to produce PostScript, too.)

(setq goby-helvetica "luxi sans")
(setq goby-times     "luxi serif")
(setq goby-courier   "luxi mono")

An example for MS fonts: (ASTEC-X also works with this)

(setq goby-helvetica "arial")
(setq goby-times     "times new roman")
(setq goby-courier   "courier new")

If you use Gnome or KDE, please add the following:

(setq goby-use-advanced-window-manager t)

Xtt

If your XFree86 does not work with TrueType fonts, you configure XFree86 so that it can display TrueType fonts. Goby works with XFree86 version 4.2.0 or later.

(0)Install mkfontscale if not installed.

“mkfontscale” is necessary in Step (1). XFree86 version 4.3.x includes mkfontscale.

XFree86 version 4.2.x does not include mkfontscale. If you have to stick XFree86 version 4.2.x because of driver problems, install mkfontscale. There are several way to do it.

(1)Installing TrueType fonts

You should decide a directory where TrueType fonts are installed, say “/somewhere/ttfont/installed/”. Copy your TrueType fonts into this directory. Then execute mkfontscale and mkfontdir in this order.

% su
# mkdir /somewhere/ttfont/installed/
# cd /somewhere/ttfont/installed/
# cp SOMEWHERE/*.ttf SOMEWHERE/*.ttc .
# mkfontscale
# mkfontdir

(2)Configuring XF86Config

Specify the directory above in FontPath of XF86Config. Specify “xtt” (or “freetype”) in Module.

Section "Files"
        FontPath     "/somewhere/ttfont/installed/"
EndSection
Section "Module"
        Load  "xtt"
EndSection

(3)Test

If you execute XFree86 again, the TrueType fonts are available.You can test them with Firefox.

If you can choose the TrueType fonts on “Font” configuration, you succeeded.

If you can use the TrueType fonts with Firefox but you cannot with Goby, your Xresources is not good. Remove all lines related with Emacs from Xresources and execute Emacs again and test.

The author personally dislikes to configure Emacs fonts in Xresources. The author configures them in “.emacs” as follows:

;; The top is a default value.
(defvar my-font-size-list '(16 14 24))
;; These sizes will be shown in a menu when you press the
;; left button pressing Shift.

(defun my-set-standard-fontset (lst &optional init-alist)
  (let ((def (car lst))
            (slst (sort lst '<))
            (form "-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-fontset-standard")
            siz spec)
    (if init-alist (setq default-frame-alist init-alist))
    (while slst
          (setq siz (car slst))
          (setq slst (cdr slst))
          (setq spec (format form siz))
          (create-fontset-from-fontset-spec spec nil 'noerror)
          (if (= siz def)
              (setq default-frame-alist
                    (cons (cons 'font spec) default-frame-alist))))
        (setq initial-frame-alist default-frame-alist)))

(my-set-standard-fontset my-font-size-list)

ASTEC-X

Add “/built-in-ttf” in “Font path” of the control panel. For more nformation, see the Section “TrueType fonts” of the manual.

Other programs