On 26-08-07 08:48, Osamu Aoki wrote:
> 
> #1 priority: fix Korean build issue.  (FTBFS bug on some packages.)

That will be difficult: I have yet to package the Korean fonts, and that will
approximately be 190MB large if all the HLaTeX fonts are converted to Unicode.

Attached you will find a Makefile; it's not 100%, but at 97,5% I think it's
pretty stable.  Running "make all" will build all the HLaTeX fonts (that will
take a few hours and a lot of disk spinning), and install everything in
~/texmf/fonts/.

pdflatex works quite nicely, but there seems to be a nasty bug in dvipdfmx
which I have yet to thoroughly investigate.

Use either

\begin{CJK}[UTF8}{}
\CJKfamily{dn}

or

\begin{CJK}[UTF8}{dn}

to use the "Dinaru" font, which seems like a pretty standard Korean font to me.

I'm not sure when I'll be able to upload the Korean font package; I'm
currently applying to become a DD, and the questions are pretty tough (I'm
doing the Technical Part now).


Best regards


-- 
Danai SAE-HAN (韓達耐)
--
題目:《春日即事》
作者:呂本中(1084-1145)

病起多情白日遲,強來庭下探花期。
雪消池館初春后,人倚欄杆欲暮時。
亂蝶狂蜂俱有意,兔葵燕麥自無知。
池邊垂柳腰支活,折盡長條為寄誰?
#!/usr/bin/make -f
# -*- makefile -*-

# Version 0.91
# 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]>.

# 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.
#
# 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


# 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

# vftovp (20060830):
# Bad VF file: Character 173 in font 1 will be ignored

# 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

# vftovp (20060830):
# Bad VF file: Character 251 in font 0 will be ignored
# Bad VF file: Character 252 in font 0 will be ignored
# Bad VF file: Character 253 in font 0 will be ignored
# Bad VF file: Character 254 in font 0 will be ignored
# Bad VF file: Character 251 in font 0 will be ignored
# Bad VF file: Character 252 in font 0 will be ignored
# Bad VF file: Character 253 in font 0 will be ignored
# Bad VF file: Character 254 in font 0 will be ignored
# Bad VF file: Character 173 in font 1 will be ignored

# Problem disappeared.  I probably ran hlatex2agl too many times.
# Creating virtual property list file `wgr07.vf.vpl'...
# Illegal hexadecimal digit 'g' ignored at hlatex2agl-hangul_symbol.pl line 
392, <INFILE> line 128.
# Illegal hexadecimal digit 'p' ignored at hlatex2agl-hangul_symbol.pl line 
392, <INFILE> line 200.
# Reading `wgr07.vf.vpl'...

# Another problem, but only appears in a few fonts.  Need to grep again, 
because the
# frequency has diminished.
# -- Problem has vanished now.
# Processing 'ugr00.pfb'...
# Illegal hexadecimal digit 'g' ignored at hlatex2agl-hangul_symbol.pl line 
446, <INFILE> line 165.
# Illegal hexadecimal digit 'g' ignored at hlatex2agl-hangul_symbol.pl line 
446, <INFILE> line 2520.
# Processing `ugr01.pfb'...
# Illegal hexadecimal digit 'p' ignored at hlatex2agl-hangul_symbol.pl line 
446, <INFILE> line 217.
# Illegal hexadecimal digit 'p' ignored at hlatex2agl-hangul_symbol.pl line 
446, <INFILE> line 4560.
# Processing `ugr02.pfb'...

# 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

# vftovp (20060830):
# Bad VF file: Character 251 in font 0 will be ignored
# Bad VF file: Character 252 in font 0 will be ignored
# Bad VF file: Character 253 in font 0 will be ignored
# Bad VF file: Character 254 in font 0 will be ignored

# 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

# vftovp (20060830):
# Bad VF file: Character 251 in font 0 will be ignored
# Bad VF file: Character 252 in font 0 will be ignored
# Bad VF file: Character 253 in font 0 will be ignored
# Bad VF file: Character 254 in font 0 will be ignored

# 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

# Also don't forget to remove fontchecksum in the changed block of the VPL file.
        # 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 $(virtual_namestem)$$i.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):
# rm -rf ~/texmf/fonts/{afm,tfm,type1,vf}/$(fontname)/
        # 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.
        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 erros after 2007-08-23

# 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.


# Errors before 2007-08-23

# 1.
# gothic/log:Use of uninitialized value in hash element at hlatex2agl.pl line 
359.
# graphic/log:Use of uninitialized value in hash element at 
hlatex2agl-hangul_symbol.pl line 359.
# jamo/log:Use of uninitialized value in array element at hlatex2agl-hangul.pl 
line 341.
# jamo/log:Use of uninitialized value in sprintf at hlatex2agl-hangul.pl line 
348.
# jamo/log:Use of uninitialized value in array element at hlatex2agl-hangul.pl 
line 349.

# 2. (for Koaung Hi)

# Raar; nu enkel nog:

# $ 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 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
# --
# gungseo/log-Rebuilding 04 to stop referring to other fonts
# gungseo/log:Bad VF file: Character 251 in font 0 will be ignored
# gungseo/log:Bad VF file: Character 252 in font 0 will be ignored
# gungseo/log:Bad VF file: Character 253 in font 0 will be ignored
# gungseo/log:Bad VF file: Character 254 in font 0 will be ignored
# --
# shinmun/log-Rebuilding 04 to stop referring to other fonts
# shinmun/log:Bad VF file: Character 251 in font 0 will be ignored
# shinmun/log:Bad VF file: Character 252 in font 0 will be ignored
# shinmun/log:Bad VF file: Character 253 in font 0 will be ignored
# shinmun/log:Bad VF file: Character 254 in font 0 will be ignored
#
# Er is geen Myoungjo of Pilgi of Jamo meer in deze lijst.

# That's why I use three arguments after vftovp instead of a simple redirect &>.
# >> might also be a solution.
#
# Koaunghi is looking into it.  Perhaps a mismatch between the .pfb and the
# .vf files.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to