--- ./fonts.dir-out.sh~ 2005-09-03 02:23:22.000000000 +0900 +++ ./fonts.dir-out.sh 2005-09-03 02:34:04.000000000 +0900 @@ -0,0 +1,68 @@ +#!/bin/sh +countline(){ + wc -l | sed -e 's/^[ ]*//' +} +fonts_dir_org=/opt/local/X11R6/lib/X11/fonts/truetype/fonts.dir +fonts_dir=fonts.dir +cp /dev/null $fonts_dir +for phase in 1 2; do + case $phase in + 1) + filter=countline + ;; + 2) + filter=cat + ;; + esac + ([ -f "$fonts_dir_org" ] && sed -ne '2,$p' "$fonts_dir_org" | grep -v 'ms-p*\(gothic\|mincho\)' + for ttf in\ + msgothic.ttf\ + msmincho.ttf\ + mspgothic.ttf\ + mspmincho.ttf\ +; do + case $ttf in + msgothic.ttf) f_f='ms-gothic' ; spc=c ;; + msmincho.ttf) f_f='ms-mincho' ; spc=c ;; + mspgothic.ttf) f_f='ms-pgothic' ; spc=p ;; + mspmincho.ttf) f_f='ms-pmincho' ; spc=p ;; + esac + wgt=normal + for kind in\ + normal\ + slant\ +; do + case $kind in + normal) + ai= + [ $spc = c ] && bw='bw=0.5:' || bw= + s=r + ;; + slant) + ai='ai=0.2:' + [ $spc = c ] && bw='bw=0.5:' || bw= + s=s + ;; + esac + cat <> $fonts_dir +done