;;; -*-Lisp-*-

;;
;; 'vflibcap' for JG fonts
;; by h.kakugawa@computer.org
;;


;; -----------------------------------------------------------------
;;   VFlib Default
;; -----------------------------------------------------------------
(define-default VFlib
  (extension-hints         (".bdf" bdf) 
			   (".pcf" pcf)
			   ("pk" TeX))
  (implicit-font-classes   jg pcf)
  (uncompression-programs  (".Z" "zcat") (".gz" "gzip -cd"))
  (variable-values  (TeX_DPI               "300")
		    (TeX_USE_KPATHSEA      "Yes")
		    (TeX_KPATHSEA_MODE     "cx")
		    (TeX_KPATHSEA_PROGRAM  "vflserver"))
  (use-kpathsea           $TeX_USE_KPATHSEA)
  (kpathsea-mode          $TeX_KPATHSEA_MODE)
  (kpathsea-dpi           $TeX_DPI)
  (kpathsea-program-name  $TeX_KPATHSEA_PROGRAM) )

;; -----------------------------------------------------------------
;;   JG Font Class Default
;; -----------------------------------------------------------------
(define-default  jg
  (filename-extensions ".fn")
  (font-directories  "/usr/local/share/fonts/JG-Fonts//")
  (properties  (FONT_CLASS       "JG")
	       (CHARSET_REGISTRY "jisx0208.1983")
	       (CHARSET_ENCODING "0")))

;; -----------------------------------------------------------------
;;   PCF Font Class Default
;; -----------------------------------------------------------------
(define-default  pcf
  (font-directories  "/usr/X11R6/lib/X11/fonts//"
		     "/usr/local/X11R6/lib/X11/fonts//"
		     "/usr/openwin/lib/X11/fonts//"
		     "/usr/X386/lib/X11/fonts//"
		     "/usr/XFree86/lib/X11/fonts//"
		     "/usr/X11/lib/X11/fonts//"
		     "/usr/local/lib/X11/fonts//"
		     "/usr/X11R5/lib/X11/fonts//"
		     "/usr/local/X11R5/lib/X11/fonts//"
		     "/usr/local/share/emacs/fonts//"
		     "/usr/local/share/fonts/X11//")
  (compression-extensions ".gz" ".Z")
  (properties ("FONT_CLASS" "PCF"))  )

;; -----------------------------------------------------------------
;;   TeX-related Font Class Default
;; -----------------------------------------------------------------
(define-default  TeX
  (tfm-directories  "TEXMF")
  (tfm-filename-extensions  ".tfm")
  (font-mapping
   ((ascii-jtex-kanji "%f.jtex") 
    "min*" "goth*" "tmin*" "tgoth*" "fj*" "tfj*" "df*" "tdf*" "rc*" "trc*")
   ((pk "%f.%dpk") *)
   ((gf "%f.%dgf") *)
   ((type1 "%f.pfb" point-size-from-tfm (magnification-adjustment 1.0)) *)
   ((vf "%f.vf") *)
   ((tfm "%f.%dtfm") *))
  (resolution-accuracy 0.02)
  (resolution-corrections
   (240  ;; epson, canonlbp
    240  263  288  312  346  415  498  597)
   (300  ;; cx
    300  329  360  432  518  622  746  896 1075 1290  240 270)
   (400  ;; sparcptr
    400  438  480  576  691  829  995 1194 1433 1720  320 360)
   (600  ;; ljfour
    600  657  720  864 1037 1244 1493 1792 2150 2580  480 540))
  (dpi $TeX_DPI))

;; -----------------------------------------------------------------
;;   GF Font Class Default
;; -----------------------------------------------------------------
(define-default gf
  (font-directories  "TEXMF"))

;; -----------------------------------------------------------------
;;   PK Font Class Default
;; -----------------------------------------------------------------
(define-default pk
  (font-directories  "TEXMF"))

;; -----------------------------------------------------------------
;;   VF Font Class Default
;; -----------------------------------------------------------------
(define-default vf
  (font-directories  "TEXMF")
  (font-mapping
   ((* "%f.%dpk") (type1 "%f.pfb" point-size-from-tfm)  *) )
  (open-style "try")     ;; "none", "try", or "require"
  (glyph-style "fill"))  ;; "fill", or "empty"

;; -----------------------------------------------------------------
;;   TFM Font Class Default
;; -----------------------------------------------------------------
(define-default tfm
  (glyph-style  "fill"))

;; -----------------------------------------------------------------
;;   ASCII-JTeX Kanji fonts
;; -----------------------------------------------------------------
(define-default  ascii-jtex-kanji
  (tfm-directories  "TEXMF")
  (tfm-filename-extensions ".tfm")
  (implicit-font-mapping-suffix ".jtex"))

;; -----------------------------------------------------------------
;;  sample font definitions for Japanese TeX
(define-font jtex-min    (font-class jg) (font-file "zkyo0by"))
(define-font jtex-goth   (font-class jg) (font-file "zkyo0by"))
(define-font jtex-tmin   (font-class jg) (font-file "zkyo0by"))
(define-font jtex-tgoth  (font-class jg) (font-file "zkyo0by"))

(define-macro min-common
  (font-class ascii-jtex-kanji) (kanji-font jtex-min)
  (kanji-font-magnification 0.9) (metric-adjustment-file "jg.adj"))
(define-macro goth-common
  (font-class ascii-jtex-kanji) (kanji-font jtex-goth)
  (kanji-font-magnification 0.8) (metric-adjustment-file "jg.adj"))
(define-macro tmin-common
  (font-class ascii-jtex-kanji) (kanji-font jtex-tmin)
  (kanji-font-magnification 0.9) (metric-adjustment-file "tjg.adj"))
(define-macro tgoth-common
  (font-class ascii-jtex-kanji) (kanji-font jtex-tgoth)
  (kanji-font-magnification 0.8) (metric-adjustment-file "tjg.adj"))

(define-font min5.jtex     (kanji-font-point-size  5)  min-common)
(define-font min6.jtex     (kanji-font-point-size  6)  min-common)
(define-font min7.jtex     (kanji-font-point-size  7)  min-common)
(define-font min8.jtex     (kanji-font-point-size  8)  min-common)
(define-font min9.jtex     (kanji-font-point-size  9)  min-common)
(define-font min10.jtex    (kanji-font-point-size 10)  min-common)
(define-font goth5.jtex    (kanji-font-point-size  5)  goth-common)
(define-font goth6.jtex    (kanji-font-point-size  6)  goth-common)
(define-font goth7.jtex    (kanji-font-point-size  7)  goth-common)
(define-font goth8.jtex    (kanji-font-point-size  8)  goth-common)
(define-font goth9.jtex    (kanji-font-point-size  9)  goth-common)
(define-font goth10.jtex   (kanji-font-point-size 10)  goth-common)
(define-font tmin5.jtex    (kanji-font-point-size  5)  tmin-common)
(define-font tmin6.jtex    (kanji-font-point-size  6)  tmin-common)
(define-font tmin7.jtex    (kanji-font-point-size  7)  tmin-common)
(define-font tmin8.jtex    (kanji-font-point-size  8)  tmin-common)
(define-font tmin9.jtex    (kanji-font-point-size  9)  tmin-common)
(define-font tmin10.jtex   (kanji-font-point-size 10)  tmin-common)
(define-font tgoth5.jtex   (kanji-font-point-size  5)  tgoth-common)
(define-font tgoth6.jtex   (kanji-font-point-size  6)  tgoth-common)
(define-font tgoth7.jtex   (kanji-font-point-size  7)  tgoth-common)
(define-font tgoth8.jtex   (kanji-font-point-size  8)  tgoth-common)
(define-font tgoth9.jtex   (kanji-font-point-size  9)  tgoth-common)
(define-font tgoth10.jtex  (kanji-font-point-size 10)  tgoth-common)
;; -----------------------------------------------------------------

(define-font zkyo0by
  (font-class jg)
  (font-file "zkyo0by"))

(define-font zkyo0byA
  (font-class jg)
  (pixel-size 32)
  (point-size 32)
  (font-file "zkyo0by"))

(define-font zkyo0byB
  (font-class jg)
  (pixel-size 32)
  (point-size 32)
  (magnification 1.2)
  (font-file "zkyo0by"))

(define-font kanji10.jtex 
  (tfm-file "min10")
  (kanji-font-point-size  10) min-common)

;; -----------------------------------------------------------------
;EOF
