Hi!

I have finally managed to get all of the fonts working, without errors in
dvips, dvipdfmx or pdflatex.  And I have found the problem with the checksum
errors: I just removed the CHECKSUM and FONTCHECKSUM lines in the .vpl
files, and when rebuilt with vptovf the checksums are reconstructed.

You will find my Makefile attached to this mail.

I hope some of you have the time to check this out.  All the instructions
are at the top of the Makefile.

You must have the Type1 UHC fonts correctly installed.  On Debian, this is
not the case (yet).  To do this, copy uhc-base.map and uhc-extra.map from
/etc/texmf/map/hlatex/ to ~/texmf/map/hlatex/ and run:

 $ updmap --enable Map uhc-base.map --enable Map uhc-extra.map

as a regular user.


I have tried these fonts with HLaTeX, and it seems to work as well.  All of
the updated files are installed in ~/texmf/fonts/*/newuhc/; the new files
are installed in ~/texmf/fonts/*/uhc/.  It's not the most logic choice of
names, I know.  In a next release I will take care of this.

@Werner: I hope you will find this script useful.  You can put it in
contrib/ or anywhere else, if you like.


Cheers


-- 
Danai SAE-HAN (韓達耐)

題目:《王充道送水仙花五十支》
作者:黃庭堅(1045-1105)

凌波仙子生塵襪,水上輕盈步微月。
是誰招此斷腸魂,種作寒花寄愁絕。
含香體素欲傾城,山礬是弟梅是兄。
坐對真成被花惱,出門一笑大江橫。
#!/usr/bin/make -f
# -*- makefile -*-

# Version 0.92
# Script to build Unicode fonts from HLaTeX, compatible with CJK.
# To run this Makefile, type "make all" and hit enter.

# Many thanks to the CJK author for all his help, Werner Lemberg
# <[EMAIL PROTECTED]>, and to Koaunghi (은광희) <[EMAIL PROTECTED]>.

# This Makefile expects a directory "latex-cjk/" with the following contents:
#  - aglfn13.txt 
(http://partners.adobe.com/public/developer/en/opentype/aglfn13.txt)
#  - hlatex2agl.pl (from the CJK package, CVS version 29 August 2006 or later)
#  - sfd2uni.pl (from the CJK package)
# Additionally, you will need UKS-Hangul.sfd installed somewhere in your
# $TEXMF tree.
#
# It is conceived to work out of the box with Debian GNU/Linux unstable,
# and with the "hlatex-fonts-base" "hlatex-fonts-extra" packages installed.
# To know what exactly these packages include, go to
# http://www.debian.org/distrib/packages#search_contents and input the name
# of the package.
#
# The UHC font map files need to be correctly installed and configured
# with updmap.  This should already be the case if the HLaTeX fonts were
# properly installed.
#
# Make sure to check out the variables and change some of the variables
# below if necessary.

###########################################################################
#
# Copyright (C) 2006-2007  Danai SAE-HAN (韓達耐) <[EMAIL PROTECTED]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program in /usr/share/common-licenses/GPL-2;
# if not, write to the Free Software Foundation, Inc., 51 Franklin St,
# Fifth Floor, Boston, MA 02110-1301 USA.
#
# You can find a copy of the GNU General Public License online at
# http://www.gnu.org/licenses/gpl.txt or on Debian systems under
# /usr/share/common-licenses/GPL-2 (part of the "base-files" package).
#
###########################################################################

# General variables:

# All font directories that need to be cleaned.  Don't change this.
allfonts = bom dinaru gothic graphic gungseo jamo myoungjo pen pilgi pilgia 
shinmun taza vada yetgul

# Fonts to build.  You may change this.
# To get all the fonts, use: fonts = bm dn dnl gt gr gs jgt jmj jnv jsr mj ph 
pn pg pga sh tt vd yt
fonts = bm dn dnl gt gr gs jgt jmj jnv jsr mj ph pn pg pga sh tt vd yt
variants = o c co x xo u uo
# Your principal TEXMF tree; change this if necessary.
texmf = /usr/share/texmf
# Where to find UKS-HLaTeX.sfd; change this if necessary.
get_sfdfile = $(texmf)/fonts/sfd/UKS-HLaTeX.sfd

# The path to the Perl "rename" executable.
# On Debian it's "prename"; since August 2007 /usr/bin/rename uses the
# system of alternatives, in order to coexist with the "mmv" executable.
rename = /usr/bin/prename

# Font options:

# Bom 봄글씨
bm_fontname = bom
bm_namestem = bm
bm_virtual_namestem = wbm
bm_real_namestem = ubm
bm_bold = no
bm_sfd = hangul

# Dinaru 디나루
dn_fontname = dinaru
dn_namestem = dn
dn_virtual_namestem = wdn
dn_real_namestem = udn
dn_bold = yes
dn_sfd = hangul

# Dinaru light
dnl_fontname = dinaru
dnl_namestem = dnl
dnl_virtual_namestem = wdnl
dnl_real_namestem = udnl
dnl_bold = no
dnl_sfd = hangul

# Problems with dvips.  pdflatex also shows warnings about these fonts.
#
# Strange, no warnings in the log.
# Perhaps because the new .pfb names are exactly the same as those in the 
original UHC directory?
# The new .pfb files below don't have "AGL compliant glyph names added by 
script hlatex2agl.pl
# 2005-Jul-27." at the beginning of the file; others, like Myoungjo, have this 
line.
#
# It seems that some of the new .pfb files are just the same as the old ones; 
hlatex2agl
# didn't process them apparently.  Curious.  Check out the naming scheme.
#
# udn00.afm isn't processed (LF/CF lines).
# udn12.afm is, but has no uni names, only ks (LF lines); is this normal?
# udn1{0,1}.afm are processed and have uni names (LF lines).
#
# EUC-KR codes are changed with Unicode ones.
#
# dinaru and pilgia are the only ones made with FontForge instead of
# Fontographer.
#
# Koaunghi doesn't know.  No particular reason why he chose
# Fontlab or FontForge; he just needs either of them to make
# font hintings.
#
# 20070819: I know the answer!!!
# All the checksums in the fonts made by Fontographer mostly the same!
# They're almost all set to the default, "27356767600".
#
# Extra but unrelated:
# type1/uhc/taza/utt10.pfb: refers to Utt10
# type1/uhc/taza/utt04.pfb: refers to Umj04
#
# The warnings were:
#
# dvips: Checksum mismatch in udn10
# ...


# Gothic 고딕
gt_fontname = gothic
gt_namestem = gt
gt_virtual_namestem = wgt
gt_real_namestem = ugt
gt_bold = yes
gt_dep_vf = umj04
gt_bad_vf = 05 06
gt_sfd = hangul_symbol_hanja

# Graphic 그래픽
gr_fontname = graphic
gr_namestem = gr
gr_virtual_namestem = wgr
gr_real_namestem = ugr
gr_bold = yes
gr_dep_vf = ugt00 ugt01 ugt03 umj04
gr_bad_vf = 04 05 06 07
gr_sfd = hangul_symbol

# Gungseo 궁서
gs_fontname = gungseo
gs_namestem = gs
gs_virtual_namestem = wgs
gs_real_namestem = ugs
gs_bold = no
gs_dep_vf = umjb00 umjb01 umjb03 umjb04
gs_bad_vf = 04 05 06 07
gs_sfd = hangul_symbol_hanja

# Jamo Gothic 자모 고딕
jgt_fontname = jamo
jgt_namestem = jgt
jgt_virtual_namestem = wjgt
jgt_real_namestem = jgt
jgt_bold = no
jgt_sfd = hangul

# Jamo Myoungjo 자모 명조
jmj_fontname = jamo
jmj_namestem = jmj
jmj_virtual_namestem = wjmj
jmj_real_namestem = jmj
jmj_bold = no
jmj_sfd = hangul

# Jamo Novel 자모 노벨
jnv_fontname = jamo
jnv_namestem = jnv
jnv_virtual_namestem = wjnv
jnv_real_namestem = jnv
jnv_bold = no
jnv_sfd = hangul

# Jamo Sora 자모 소라
jsr_fontname = jamo
jsr_namestem = jsr
jsr_virtual_namestem = wjsr
jsr_real_namestem = jsr
jsr_bold = no
jsr_sfd = hangul

# Myoungjo 명조
mj_fontname = myoungjo
mj_namestem = mj
mj_virtual_namestem = wmj
mj_real_namestem = umj
mj_bold = yes
mj_sfd = hangul_symbol_hanja

# Pen 펜글씨
pn_fontname = pen
pn_namestem = pn
pn_virtual_namestem = wpn
pn_real_namestem = upn
pn_bold = no
pn_sfd = hangul

# Pen Heulim 펜흘림
ph_fontname = pen
ph_namestem = ph
ph_virtual_namestem = wph
ph_real_namestem = uph
ph_bold = no
ph_sfd = hangul

# Pilgi 필기
pg_fontname = pilgi
pg_namestem = pg
pg_virtual_namestem = wpg
pg_real_namestem = upg
pg_bold = yes
pg_sfd = hangul

# Pilgi A 필기a
pga_fontname = pilgia
pga_namestem = pga
pga_virtual_namestem = wpga
pga_real_namestem = upga
pga_bold = no
pga_sfd = hangul

# Shinmun 신문 명조
sh_fontname = shinmun
sh_namestem = sh
sh_virtual_namestem = wsh
sh_real_namestem = ush
sh_bold = no
sh_dep_vf = umj00 umj01 umj03 umj04
sh_bad_vf = 04 05 06 07
sh_sfd = hangul_symbol_hanja

# Taza 타자 (Typewriter)
tt_fontname = taza
tt_namestem = tt
tt_virtual_namestem = wtt
tt_real_namestem = utt
tt_bold = no
tt_dep_vf = umj04 ugt01 ugt02 ugt03 ugt05 ugt20 ugt21 ugt22 ugt23 ugt24 ugt25 
ugt26 ugt27 ugt28 ugt29 ugt30 ugt31 ugt32 ugt33 ugt34 ugt35 ugt36 ugt37 ugt38
tt_bad_vf = 04 05 06 07 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
28 29
tt_sfd = hangul_symbol_hanja

# Vada 바다
vd_fontname = vada
vd_namestem = vd
vd_virtual_namestem = wvd
vd_real_namestem = uvd
vd_bold = no
vd_sfd = hangul

# Yetgul 옛글
yt_fontname = yetgul
yt_namestem = yt
yt_virtual_namestem = wyt
yt_real_namestem = uyt
yt_bold = no
yt_sfd = hangul_hanja


# Variable substitutions:

fontname = $($(abbrev)_fontname)
namestem = $($(abbrev)_namestem)
virtual_namestem = $($(abbrev)_virtual_namestem)
real_namestem = $($(abbrev)_real_namestem)
bold = $($(abbrev)_bold)
dep_vf = $($(abbrev)_dep_vf)
bad_vf = $($(abbrev)_bad_vf)
fix_vf_namestems = $(shell for i in $(dep_vf); do printf $$i|cut -c -3 -; done)
sfd = $($(abbrev)_sfd)
build-stamp_fonts = $(addprefix build-stamp.,$(fonts))
clean_fonts = $(addprefix clean_,$(fonts))
fdfile_fonts = $(addprefix fdfile_,$(fonts))
uninstall_fonts = $(addprefix uninstall_,$(fonts))
install_fonts = $(addprefix install_,$(fonts))
install2_fonts = $(addprefix install2_,$(fonts))

sfdfile_hangul = UKS-HLaTeX-Hangul.sfd
sfdfile_hangul_symbol = UKS-HLaTeX-Hangul_Symbol.sfd
sfdfile_hangul_hanja = UKS-HLaTeX-Hangul_Hanja.sfd
sfdfile_hangul_symbol_hanja = UKS-HLaTeX.sfd
sfdfile = $(sfdfile_$($(abbrev)_sfd))
fdfile = $(fontname)/c70$(namestem).fd


all: clean sfdfiles build fdfile uninstall install


clean:
        rm -f build-stamp
        rm -f 
latex-cjk/{$(sfdfile_hangul),$(sfdfile_hangul_symbol),$(sfdfile_hangul_hanja),$(sfdfile_hangul_symbol_hanja)}
        @for i in $(allfonts);\
          do echo "Removing $$i/"; rm -rf $$i; done

        @echo


sfdfiles:
        cp $(get_sfdfile) latex-cjk/
        @echo

# To change a line with sed with option "c",
# see http://www.grymoire.com/Unix/Sed.html#uh-42

        echo "# $(sfdfile_hangul)" > latex-cjk/$(sfdfile_hangul)
        sed -e '1d' \
            -e '/^# Symbol/,/^# eof/c# eof' \
            latex-cjk/$(sfdfile_hangul_symbol_hanja) >> 
latex-cjk/$(sfdfile_hangul)

        echo "# $(sfdfile_hangul_symbol)" > latex-cjk/$(sfdfile_hangul_symbol)
        sed -e '1d' \
            -e '/^# Hanja/,/^# eof/c# eof' \
            latex-cjk/$(sfdfile_hangul_symbol_hanja) >> 
latex-cjk/$(sfdfile_hangul_symbol)

        echo "# $(sfdfile_hangul_hanja)" > latex-cjk/$(sfdfile_hangul_hanja)
        sed -e '1d' \
            -e '/^# Symbol/,/^# Hanja/c# Hanja.sfd' \
            latex-cjk/$(sfdfile_hangul_symbol_hanja) >> 
latex-cjk/$(sfdfile_hangul_hanja)

        @echo

test:
        cd graphic;\
        for i in *.vf;\
          do i=`echo $$i|cut -d . -f 1`;\
            echo $$i;\
        done

build: build-stamp
build-stamp: sfdfiles $(build-stamp_fonts)
        touch build-stamp

        @echo


$(build-stamp_fonts): abbrev = $(patsubst build-stamp.%,%,$@)
$(build-stamp_fonts):
        ### Starting to build "$(fontname) ($(abbrev))".
        # Copying the necessary files to $(fontname)/.
        mkdir -p $(fontname)
        cp $(texmf)/fonts/{afm,tfm,type1}/uhc/$(fontname)/$(real_namestem)* 
$(fontname)/
        cp $(texmf)/fonts/{tfm,vf}/uhc/$(fontname)/$(virtual_namestem)* 
$(fontname)/
        cp latex-cjk/{sfd2uni.pl,hlatex2agl.pl,aglfn13.txt,$(sfdfile)} 
$(fontname)/
        @echo

        # Make some .vf files refer to their own font instead of others'.
        @if [[ -n "$(bad_vf)" ]];\
          then cd $(fontname);\
          for i in $(dep_vf);\
            do cp $(texmf)/fonts/{afm,tfm,type1}/uhc/*/$$i* .;\
              $(rename) -f 's/^u../$(real_namestem)/' $$i*;\
          done;\
          for i in $(bad_vf);\
            do echo "Rebuilding $(virtual_namestem)$$i.vf to stop referring to 
other fonts" 2>&1 | tee -a log;\
               vftovp -charcode-format=octal 
$(texmf)/fonts/vf/uhc/$(fontname)/$(virtual_namestem)$$i.vf 
$(virtual_namestem)$$i.tfm | sed -e '/(CHECKSUM/ d' -e '/(FONTCHECKSUM/ d' - > 
$$i.vf.vpl 2>&1 | tee -a log;\
            for j in $(fix_vf_namestems);\
              do sed -i -e 's/'$$j'/$(real_namestem)/g' 
$(virtual_namestem)$$i.vpl 2>&1 | tee -a log;\
            done;\
            vptovf $(virtual_namestem)$$i.vpl $(virtual_namestem)$$i.vf 
$(virtual_namestem)$$i.tfm 2>&1 | tee -a log;\
          done;\
        if [[ $(bold) = yes ]];\
          then for i in $(dep_vf);\
            do j=`echo $$i|cut -c -3 -`b`echo $$i|cut -c 4- -`;\
               cp $(texmf)/fonts/{afm,tfm,type1}/uhc/*/$$j* .;\
               $(rename) -f 's/^u../$(real_namestem)/' $$j*;\
          done;\
          for i in $(bad_vf);\
            do echo "Rebuilding $$i to stop referring to other fonts" 2>&1 | 
tee -a log;\
               vftovp -charcode-format=octal 
$(texmf)/fonts/vf/uhc/$(fontname)/$(virtual_namestem)b$$i.vf 
$(virtual_namestem)b$$i.tfm $(virtual_namestem)b$$i.vpl 2>&1 | tee -a log;\
            for j in $(fix_vf_namestems);\
                do sed -i -e 's/'$$j'/$(real_namestem)/g' 
$(virtual_namestem)b$$i.vpl;\
            done;\
            vptovf $(virtual_namestem)b$$i.vpl $(virtual_namestem)b$$i.vf 
$(virtual_namestem)b$$i.tfm 2>&1 | tee -a log;\
          done;\
        fi;\
        fi
        @echo


        # sfd -> Unicode
        @cd $(fontname);\
         perl sfd2uni.pl $(sfdfile) $(virtual_namestem) u$(virtual_namestem) 
HLATEX 2>&1 | tee -a log;\
         for i in $(variants);\
          do perl sfd2uni.pl $(sfdfile) $(virtual_namestem)$$i 
u$(virtual_namestem)$$i HLATEX 2>&1 | tee -a log;\
           if [[ $(bold) = "yes" ]];\
            then perl sfd2uni.pl $(sfdfile) $(virtual_namestem)b$$i 
u$(virtual_namestem)b$$i HLATEX 2>&1 | tee -a log;\
          fi;\
        done
        @echo

        # Recompile the TFM files.
# * Leaving out the third argument will cause hlatex2agl.pl to fail.
# Using $$i instead of $$i.tfm works, but the warnings remain.
# * Problem when two fonts build in the same $(fontname) directory:
# it will do the same work twice.

        cd $(fontname);\
        for i in *.tfm;\
          do echo "Recompiling $$i" 2>&1 | tee -a log;\
            tftopl -charcode-format=octal $$i | sed -e '/(CHECKSUM/ d' - > 
$$i.pl 2>&1 | tee -a log;\
            rm -f $$i;\
            pltotf $$i.pl $$i 2>&1 | tee -a log;\
            rm -f $$i.pl;\
        done

        # Recompile the VF files to take into account the
        # modified checksums from the TFM files.
# Also remove FONTCHECKSUM; otherwise you get checksum errors for udn10,
# udn11, etc. in files like wdn5,vf and wdn6.vf.  The checksum references
# are recreated with vptovf.

        cd $(fontname);\
        for i in *.vf;\
          do i=`echo $$i|cut -d . -f 1`;\
            vftovp -charcode-format=octal $$i.vf | sed -e '/(CHECKSUM/ d' -e 
'/(FONTCHECKSUM/ d' - > $$i.vf.vpl 2>&1 | tee -a log;\
            rm -f $$i.vf;\
            vptovf $$i.vf.vpl $$i.vf $$i.tfm 2>&1 | tee -a log;\
            rm -f $$i.vf.vpl;\
        done

        # Adding AGL compliant glyph names to fonts from the HLaTeX package.
        @cd $(fontname);\
        perl hlatex2agl.pl $(virtual_namestem) $(real_namestem) $(sfdfile) 2>&1 
| tee -a log;\
        if [[ $(bold) = "yes" ]];\
          then perl hlatex2agl.pl $(virtual_namestem)b $(real_namestem)b 
$(sfdfile) 2>&1 | tee -a log;\
        fi
        @echo


fdfile: $(fdfile_fonts)
        @echo
$(fdfile_fonts): abbrev = $(patsubst fdfile_%,%,$@)
$(fdfile_fonts):
        @echo "Create $(fontname)/c70$(namestem).fd"
        @echo -e "% This is the file c70$(namestem).fd of the CJK package\n\
        %   for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e\n\
        %\n\
        % created by Werner Lemberg <[EMAIL PROTECTED]>\n\
        %\n\
        % Version 4.6.0 (11-Aug-2005)\n\n\
        \\def\\\\fileversion{4.6.0}\n\
        \\def\\\\filedate{2005/08/11}\n\
        
\\ProvidesFile{c70$(namestem).fd}[\\\\filedate\\space\\\\fileversion]\n\n\n\
        % character set: KS X 1001\n\
        % font encoding: Unicode\n\n\
        \\DeclareFontFamily{C70}{$(namestem)}{\\hyphenchar [EMAIL PROTECTED]" > 
$(fdfile)

        @echo "\\DeclareFontShape{C70}{$(namestem)}{m}{n}{<-> CJK * 
u$(virtual_namestem)}{}" >> $(fdfile)
        @if [[ $(bold) = "yes" ]];\
          then echo "\\DeclareFontShape{C70}{$(namestem)}{b}{n}{<-> CJK * 
u$(virtual_namestem)b}{}" >> $(fdfile);\
          else echo "\\DeclareFontShape{C70}{$(namestem)}{b}{n}{<-> CJKb * 
u$(virtual_namestem)}{\\CJKbold}" >> $(fdfile);\
        fi

        @for i in $(variants);\
        do case $$i in \
                "o") echo "\DeclareFontShape{C70}{$(namestem)}{m}{sl}{<-> CJK * 
u$(virtual_namestem)o}{}" >> $(fdfile);\
                     if [[ $(bold) = "yes" ]]; then \
                       echo "\\DeclareFontShape{C70}{$(namestem)}{b}{sl}{<-> 
CJK * u$(virtual_namestem)bo}{}" >> $(fdfile);\
                     else echo "\DeclareFontShape{C70}{$(namestem)}{b}{sl}{<-> 
CJKb * u$(virtual_namestem)o}{\CJKbold}" >> $(fdfile);\
                     fi;\
                     echo "\DeclareFontShape{C70}{$(namestem)}{m}{it}{<-> 
CJKssub * $(namestem)/m/sl}{}" >> $(fdfile);\
                     echo "\DeclareFontShape{C70}{$(namestem)}{b}{it}{<-> 
CJKssub * $(namestem)/b/sl}{}" >> $(fdfile);\
                     echo >> $(fdfile) ;;\
                "c") echo "\DeclareFontShape{C70}{$(namestem)}{c}{n}{<-> CJK * 
u$(virtual_namestem)c}{}" >> $(fdfile);\
                     if [[ $(bold) = "yes" ]]; then \
                       echo "\\DeclareFontShape{C70}{$(namestem)}{bc}{n}{<-> 
CJK * u$(virtual_namestem)bc}{}" >> $(fdfile);\
                     else echo "\DeclareFontShape{C70}{$(namestem)}{bc}{n}{<-> 
CJKb * u$(virtual_namestem)c}{\CJKbold}" >> $(fdfile);\
                     fi ;;\
                "co") echo "\DeclareFontShape{C70}{$(namestem)}{c}{sl}{<-> CJK 
* u$(virtual_namestem)co}{}" >> $(fdfile);\
                      if [[ $(bold) = "yes" ]]; then \
                        echo "\\DeclareFontShape{C70}{$(namestem)}{bc}{sl}{<-> 
CJK * u$(virtual_namestem)bco}{}" >> $(fdfile);\
                        else echo 
"\DeclareFontShape{C70}{$(namestem)}{bc}{sl}{<-> CJKb * 
u$(virtual_namestem)co}{\CJKbold}" >> $(fdfile);\
                      fi;\
                    echo "\DeclareFontShape{C70}{$(namestem)}{c}{it}{<-> 
CJKssub * $(namestem)/c/sl}{}" >> $(fdfile);\
                    echo "\DeclareFontShape{C70}{$(namestem)}{bc}{it}{<-> 
CJKssub * $(namestem)/bc/sl}{}" >> $(fdfile);\
                    echo >> $(fdfile) ;;\
                "x") echo "\DeclareFontShape{C70}{$(namestem)}{x}{n}{<-> CJK * 
u$(virtual_namestem)x}{}" >> $(fdfile);\
                      if [[ $(bold) = "yes" ]]; then \
                        echo "\\DeclareFontShape{C70}{$(namestem)}{bx}{n}{<-> 
CJK * u$(virtual_namestem)bx}{}" >> $(fdfile);\
                        else echo 
"\DeclareFontShape{C70}{$(namestem)}{bx}{n}{<-> CJKb * 
u$(virtual_namestem)x}{\CJKbold}" >> $(fdfile);\
                      fi ;;\
                "xo") \
                    echo "\DeclareFontShape{C70}{$(namestem)}{x}{sl}{<-> CJK * 
u$(virtual_namestem)xo}{}" >> $(fdfile);\
                    if [[ $(bold) = "yes" ]]; then \
                        echo "\\DeclareFontShape{C70}{$(namestem)}{bx}{sl}{<-> 
CJK * u$(virtual_namestem)bxo}{}" >> $(fdfile);\
                    else echo "\DeclareFontShape{C70}{$(namestem)}{bx}{sl}{<-> 
CJKb * u$(virtual_namestem)xo}{\CJKbold}" >> $(fdfile);\
                    fi;\
                    echo "\DeclareFontShape{C70}{$(namestem)}{x}{it}{<-> 
CJKssub * $(namestem)/x/sl}{}" >> $(fdfile);\
                    echo "\DeclareFontShape{C70}{$(namestem)}{bx}{it}{<-> 
CJKssub * $(namestem)/bx/sl}{}" >> $(fdfile);\
                    echo >> $(fdfile) ;;\
                "u") \
                    echo "\DeclareFontShape{C70}{$(namestem)}{ux}{n}{<-> CJK * 
u$(virtual_namestem)u}{}" >> $(fdfile);\
                    if [[ $(bold) = "yes" ]]; then \
                        echo "\\DeclareFontShape{C70}{$(namestem)}{bux}{n}{<-> 
CJK * u$(virtual_namestem)bu}{}" >> $(fdfile);\
                    else echo "\DeclareFontShape{C70}{$(namestem)}{bux}{n}{<-> 
CJKb * u$(virtual_namestem)u}{\CJKbold}" >> $(fdfile);\
                    fi ;;\
                "uo") \
                    echo "\DeclareFontShape{C70}{$(namestem)}{ux}{sl}{<-> CJK * 
u$(virtual_namestem)uo}{}" >> $(fdfile);\
                    if [[ $(bold) = "yes" ]]; then \
                        echo "\\DeclareFontShape{C70}{$(namestem)}{bux}{sl}{<-> 
CJK * u$(virtual_namestem)buo}{}" >> $(fdfile);\
                    else echo "\DeclareFontShape{C70}{$(namestem)}{bux}{sl}{<-> 
CJKb * u$(virtual_namestem)uo}{\CJKbold}" >> $(fdfile);\
                    fi;\
                    echo "\DeclareFontShape{C70}{$(namestem)}{ux}{it}{<-> 
CJKssub * $(namestem)/ux/sl}{}" >> $(fdfile);\
                    echo "\DeclareFontShape{C70}{$(namestem)}{bux}{it}{<-> 
CJKssub * $(namestem)/bux/sl}{}" >> $(fdfile);\
                    echo >> $(fdfile) ;;\
                *) \
                    echo "Oops, don't know this variant" ;;\
            esac;\
        done
        @echo "\endinput" >> $(fdfile)


uninstall: $(uninstall_fonts)
$(uninstall_fonts): abbrev = $(patsubst uninstall_%,%,$@)
$(uninstall_fonts):
        # Removing $(fontname) from ~/texmf/.
# Be careful.  pen and jamo have multiple fonts in their directories.
# So I need a better way to clean these directories.  Also watch out for
# "dn" and "dnl"; so always build them together.
        rm -rf ~/texmf/fonts/{afm,tfm,type1,vf}/uhc/$(fontname)
        rm -rf ~/texmf/fonts/{tfm,vf}/newuhc/$(fontname)
        @echo

install: $(install_fonts)
        texhash ~/texmf/
$(install_fonts): abbrev = $(patsubst install_%,%,$@)
$(install_fonts):
        # Installing $(fontname) in ~/texmf/.
        mkdir -p ~/texmf/fonts/{afm,tfm,type1,vf}/uhc/$(fontname)/
        cp $(fontname)/$(real_namestem)*.afm ~/texmf/fonts/afm/uhc/$(fontname)
        cp $(fontname)/u$(virtual_namestem)*.tfm 
~/texmf/fonts/tfm/uhc/$(fontname)/
        cp $(fontname)/$(real_namestem)*.pfb 
~/texmf/fonts/type1/uhc/$(fontname)/
        cp $(fontname)/u$(virtual_namestem)*.vf 
~/texmf/fonts/vf/uhc/$(fontname)/
        cp -f $(fontname)/c70$(namestem).fd ~/texmf/tex/latex/CJK/UTF8/
        @echo

        # Replace the original VF with the new ones.
        # Reason: the new TFM files have their own checksums.
        # The original $(virtual_namestem).tfm files are the same as the 
orginal.
        # I have tried these fonts and they seem to work with HLaTeX as well, so
        # you might even try to remove the HLaTeX fonts after the following 
files
        # are installed..
        mkdir -p ~/texmf/fonts/{tfm,vf}/newuhc/$(fontname)
        cp $(fontname)/$(real_namestem)*.tfm 
~/texmf/fonts/tfm/newuhc/$(fontname)/
        cp $(fontname)/$(virtual_namestem)*.tfm 
~/texmf/fonts/tfm/newuhc/$(fontname)/
        cp $(fontname)/$(virtual_namestem)*.vf 
~/texmf/fonts/vf/newuhc/$(fontname)/
        @echo

# Temporary target to clean everything in the build directory.  Pretty useless.
install2: $(install_fonts)
$(install2_fonts): abbrev = $(patsubst install2_%,%,$@)
$(install2_fonts):
        mkdir -p $(fontname)/{afm,tfm,type1,vf}
        mv $(fontname)/*.afm $(fontname)/afm/
        mv $(fontname)/u$(virtual_namestem)*.tfm $(fontname)/tfm/
        mv $(fontname)/*.pfb $(fontname)/type1/
        mv $(fontname)/u$(virtual_namestem)*.vf $(fontname)/vf/


.PHONY: all build clean fdfile sfdfiles install install2


# Warnings

# Remaining errors after 2007-08-23

# 1.
# Reading `wgtb28.vf.vpl'...
# Creating virtual property list file `wgtb29.vf.vpl'...
# Use of uninitialized value in hash element at hlatex2agl.pl line 360.
# Reading `wgtb29.vf.vpl'...
#
# From now on it stops processing the vf.vpl files and continues with:
# Processing `ugtb00.afm'...
#
# This happens not only once with gothic, but also once with graphic.


# 2.
#
# $ grep -B1 -i bad */log
# gothic/log-Rebuilding 05 to stop referring to other fonts
# gothic/log:Bad VF file: Character 173 in font 1 will be ignored
# --
# graphic/log-Rebuilding 04 to stop referring to other fonts
# graphic/log:Bad VF file: Character 251 in font 0 will be ignored
# graphic/log:Bad VF file: Character 252 in font 0 will be ignored
# graphic/log:Bad VF file: Character 253 in font 0 will be ignored
# graphic/log:Bad VF file: Character 254 in font 0 will be ignored
# graphic/log-Rebuilding 05 to stop referring to other fonts
# graphic/log:Bad VF file: Character 173 in font 1 will be ignored
#
# Myoungjo, Pilgi, Shinmun, Gungseo and Jamo don't show these errors anymore.
#
# That's why I use three arguments after vftovp instead of a simple redirect &>.
# >> might also be a solution.
#
# Perhaps a mismatch between the .pfb and the .vf files, according
# to Koaunghi.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Cjk maillist  -  [email protected]
https://lists.ffii.org/mailman/listinfo/cjk

Reply via email to