[tex-k] afm2tfm hardwired charht
Karl Berry
karl at freefriends.org
Mon Mar 10 12:50:45 CET 2003
Greetings,
The attached test.afm file has only one character in it, a capital A,
with these values:
C 65 ; WX 690 ; N A ; B 2 -4 685 682 ;
When I run
afm2tfm test.afm -v test.vpl test.tfm
on this test.afm, the resulting test.vpl file has a strange set of
CHARHT values, for both uppercase and lowercase letters. This is with
afm2tfm 8.1 from TeX Live 7.
The height of A is 400 (the default xheight), instead of the correct
682. The height of C, D, c, d, and other letters is also 400. However,
the height of B, b, and another set of letters is the correct zero.
Looking at the source, it is just inserting the value from the
texheight function. And texheight ends with:
if (0 != (acci=findadobe(buffer))
return (acci->ury - aci->ury + xheight) ;
So I guess findadobe is sometimes returning nonzero even though the
character doesn't exist, and thus it returns the xheight. Furthermore,
the actual height of the A from the afm file is being ignored.
The test.tfm file that afm2tfm creates is correct.
Sorry I don't have an actual patch. Hope it's easy.
Thanks,
karl
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2003-03-10 09:50 PST by <karl at lark.freefriends.org>.
# Source directory was `/u/karl/tex/fonts/ourfonts/baskerville/r/a'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 10079 -rw-rw-rw- test.afm
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
if test "$gettext_dir" = FAILED && test -f $dir/gettext \
&& ($dir/gettext --version >/dev/null 2>&1)
then
set `$dir/gettext --version 2>&1`
if test "$3" = GNU
then
gettext_dir=$dir
fi
fi
if test "$locale_dir" = FAILED && test -f $dir/shar \
&& ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
then
locale_dir=`$dir/shar --print-text-domain-dir`
fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
echo=echo
else
TEXTDOMAINDIR=$locale_dir
export TEXTDOMAINDIR
TEXTDOMAIN=sharutils
export TEXTDOMAIN
echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$2 "$8"'
else
shar_touch=:
echo
$echo 'WARNING: not restoring timestamps. Consider getting and'
$echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh32096; then
$echo 'x -' 'creating lock directory'
else
$echo 'failed to create lock directory'
exit 1
fi
# ============= test.afm ==============
if test -f 'test.afm' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'test.afm' '(file already exists)'
else
$echo 'x -' extracting 'test.afm' '(gzipped)'
sed 's/^X//' << 'SHAR_EOF' | uudecode &&
begin 600 _sh32096/gzi
M'XL(`+S*;#X"`WV:77?:.!"&[_D5NMP]9YO8YB,AO2(IZ9)-H!M"/W(G;`%*
M;8O*=DERT=^^!KHM+S/CT]-3J-Z,1L_(DEXYTU+[\MKEY9TIO8T+%9T$K2N7
M928OU7N3&Z]+DZCYBUHOM$EL^:OQRAM=6I>K=[7B0MW5G^ZT5V&@@OY%U+N(
M`A4%0;NU#3[6F5'+^7??NJ[2].";SFSZ\OO[)V.7JU+=FV65:M\:N]+&1OWQ
M.X^%=YFJ4]7;J&INRTROM\EEB]+K6AJ>!"=A])=:E>7ZXO1TL]F<Q,5)59WD
MZ>F/E<XW)C_]J3U5?[9&I4YM/,B7J5%!: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[9"-".7HH*T-`K
MFR9HZ)>-C`,MLY7R at QI8*3_<F1OS at RI8.3^TSH9;V-`WY\($Z1S]`@<_4/3,
M3A at H>F;7-%`TSDY*#JK@&G!`(1P7"HK at A(4-77,ET$#/7`DTT"Q73330,E?R
M.-$ROT@]=_`U+;NPH6->&I_I/)FGQYT.\^3@%[:V7P]^FZ[U'U>8&]I?)P``
`
end
SHAR_EOF
$echo 'gunzipping file' 'test.afm' &&
gzip -d < _sh32096/gzi > 'test.afm' &&
(set 20 03 03 10 09 26 20 'test.afm'; eval "$shar_touch") &&
chmod 0666 'test.afm' ||
$echo 'restore of' 'test.afm' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'test.afm:' 'MD5 check failed'
baa5cf2750108c15d80eb427c3de61b2 test.afm
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'test.afm'`"
test 10079 -eq "$shar_count" ||
$echo 'test.afm:' 'original size' '10079,' 'current size' "$shar_count!"
fi
fi
rm -fr _sh32096
exit 0
More information about the tex-k
mailing list