diff options
author | Karl Berry <karl@freefriends.org> | 2009-04-08 15:23:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-04-08 15:23:21 +0000 |
commit | 3c7425be9ae616dfaf0242771a1e61218b89d699 (patch) | |
tree | 8120077e1e9fb37391d4dd653c7dcab11e021a0c /Master | |
parent | 4421bb9f8431cd4441d9e2ea933a2c6659f83ff0 (diff) |
accfonts update (7apr)
git-svn-id: svn://tug.org/texlive/trunk@12661 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/fonts/accfonts/CHANGES | 18 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/fonts/accfonts/mkt1font | 76 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/fonts/accfonts/vpl2ovp | 2 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/fonts/accfonts/vpl2vpl | 2 |
4 files changed, 61 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/fonts/accfonts/CHANGES b/Master/texmf-dist/doc/fonts/accfonts/CHANGES index 92a5b8312f9..039ab7709bb 100644 --- a/Master/texmf-dist/doc/fonts/accfonts/CHANGES +++ b/Master/texmf-dist/doc/fonts/accfonts/CHANGES @@ -260,7 +260,7 @@ A. Changes to mkt1font ~~~~~~~~~~~~~~~~~~~~~~ No changes have in fact been made to mkt1font, but its version number -has been raised to 0.23 to confirm with those of vpl2vpl and vpl2ovp. +has been raised to 0.23 to conform with those of vpl2vpl and vpl2ovp. B. Changes to vpl2vpl ~~~~~~~~~~~~~~~~~~~~~ @@ -324,3 +324,19 @@ A bug has been fixed that generated "ghost" replicas of some existing accent characters in the Private Use Area. The handling of digraphs and underscored digraphs has been brought into better Unicode compliance. The help information has also been improved. + +Changes between release 0.24 and release 0.25 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A. Changes to mkt1font +~~~~~~~~~~~~~~~~~~~~~~ + +Various bugs have been fixed. Rounding of non-integer values to +integers has been improved. + +B. Changes to vpl2vpl +~~~~~~~~~~~~~~~~~~~~~ + +No changes have in fact been made to vpl2vpl or vpl2ovp, but their +version number has been raised to 0.25 to conform with that of +mkt1font. diff --git a/Master/texmf-dist/doc/fonts/accfonts/mkt1font b/Master/texmf-dist/doc/fonts/accfonts/mkt1font index a82e9181437..966ba5932d9 100755 --- a/Master/texmf-dist/doc/fonts/accfonts/mkt1font +++ b/Master/texmf-dist/doc/fonts/accfonts/mkt1font @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -$version = 0.24; +$version = 0.25; #-----------------------------------------------------------------------------# $description = "Syntax: mkt1font -n fontname -d definition-file -a afm-file -f font-file @@ -326,30 +326,28 @@ $v2 = $capheight - $xheight; # vertical offset for accented caps etc # $itadj = sin($italangle * 3.14159 / 180) / cos($italangle * 3.14159 / 180); -################# -# Create dotlessj -################# +########################### +# Create uni0237 (dotlessj) +########################### # -$chstrings{dotlessj} = $chstrings{j} . "\n"; -$chstrings{dotlessj} =~ /\A(.*?)(\t[-0-9 ]+?[rvh]moveto)(.*?closepath)(.*?(-?\d+) [rv]moveto.*?closepath)(.*?)\Z/ms; -($one, $two, $three, $four, $five, $six) = ($1, $2, $3, $4, $5, $6); -if ($five > 0) { $chstrings{dotlessj} = $one . $two . $three . $six } +$chstrings{uni0237} = $chstrings{j} . "\n"; +$chstrings{uni0237} =~ /\A(.*?)(\t[-0-9 ]+?[rvh]moveto)(\n.+)(\n\t.*?(-?\d+) [rv]moveto)(.*?)(\n\tendchar.*?)\Z/ms; +($one, $two, $three, $four, $five, $six, $seven) = ($1, $2, $3, $4, $5, $6, $7); +if ($five > 0) { $chstrings{uni0237} = $one . $two . $three . $seven } else { findend("j1", ($two . $three)); $j1end = "\t$hend{j1} $vend{j1} rmoveto"; - $chstrings{dotlessj} = $one . $j1end . $four . $six + $chstrings{uni0237} = $one . $j1end . $four . $six . $seven } -$chstrings{dotlessj} =~s/\A\/j /\/dotlessj /m; -$chdefsnum += 1; +$chstrings{uni0237} =~s/\A\/j /\/uni0237 /m; getcharinfo("j"); getcharinfo("dotlessi"); -$metrics_unenc .= "C -1 ; WX $chwd{j} ; N dotlessj ; B $chls{j} $chdp{j} $chrs{j} $chht{dotlessi} ;\n"; - +$metrics_unenc .= "C -1 ; WX $chwd{j} ; N uni0237 ; B $chls{j} $chdp{j} $chrs{j} $chht{dotlessi} ;\n"; +# ###################### # Build the characters ###################### # -# # First build a list of definitions supplied by user # for (@deflines) { @@ -567,8 +565,9 @@ while (<DIS>) { # get header close DIS; unlink $disfile1; foreach $subrdef (@subrs) { print OUTDIS $subrdef } +$chdefsnum = scalar(keys(%chstrings)); print OUTDIS "$nd\n2 index /CharStrings $chdefsnum dict dup begin\n"; -foreach $chdef (sort values %chstrings) { print OUTDIS $chdef } +foreach (sort values %chstrings) { print OUTDIS } print OUTDIS $distail; close OUTDIS; system "t1asm -b $disfile2 >$opt_n.pfb 2>/dev/null"; @@ -590,7 +589,7 @@ sub subacc { $astr = "C $num ; WX $chwd{$char} ; N $nchar ; B $chls{$char} "; $astr .= "$chdp{$acc} $chrs{$char} $chht{$char} ;\n"; $metrics_enc[$num] = $astr; - $h = int(($chwd{$char} - $chwd{$acc}) / 2 + $chls{$acc}); + $h = round(($chwd{$char} - $chwd{$acc}) / 2 + $chls{$acc}); unless (defined $hend{$char}) { findend($char, $chstrings{$char}) } $H = $h - $hend{$char} - $chls{$char}; $V = -$vend{$char}; @@ -602,7 +601,6 @@ sub subacc { $pstr = "/$nchar {\n$chdef % $nchar: start of $acc\n"; $pstr .= "\t$H $V rmoveto\n$acdef"; $chstrings{$nchar} = $pstr; - $chdefsnum += 1; } sub supacc { @@ -614,7 +612,7 @@ sub supacc { ($old = $metrics_enc[$num]) =~ s/^C $num/C -1/; $metrics_unenc .= $old unless $metrics_unenc =~ /$old/m; if ($char eq "i") { $char = "dotlessi" } - if ($char eq "j") { $char = "dotlessj" } + if ($char eq "j") { $char = "uni0237" } if ($acc eq "overdot") { $acc = "dotaccent" } if ($acc eq "candrabindu") { $acc = "breve"; @@ -645,7 +643,7 @@ sub supacc { $astr .= "$v ;\n"; $metrics_enc[$num] = $astr; $v -= $chht{$acc}; - $h = int(($chwd{$char} - $chwd{$acc}) / 2 + $chls{$acc} - $it); + $h = round(($chwd{$char} - $chwd{$acc}) / 2 + $chls{$acc} - $it); unless (defined $hend{$char}) { findend($char, $chstrings{$char}) } $H = $h - $hend{$char} - $chls{$char}; $V = $v - $vend{$char}; @@ -658,7 +656,7 @@ sub supacc { $pstr .= "\t$H $V rmoveto\n$acdef"; if ($cb) { # candrabindu getcharinfo("dotaccent") unless defined $chwd{dotaccent}; - $h = int(($chwd{$char} - $chwd{dotaccent}) / 2 + $chls{dotaccent} - $it); + $h = round(($chwd{$char} - $chwd{dotaccent}) / 2 + $chls{dotaccent} - $it); $h += $cbx; $v += $cby; $cb = fixhints($nchar, "dotaccent", $cb, $h, $v); @@ -669,8 +667,7 @@ sub supacc { $pstr =~ s/\tendchar\n\t} $rend\n\Z//m; $pstr .= " % $nchar: start of dotaccent\n\t$H $V rmoveto\n$cb"; } - $chstrings{$nchar} = $pstr; - $chdefsnum += 1; +$chstrings{$nchar} = $pstr; } sub underacc { @@ -696,7 +693,7 @@ sub underacc { getcharinfo($char) unless defined $chwd{$char}; getcharinfo($acc) unless defined $chwd{$acc}; if ($acc =~ /^$supacc$/) { - $v = int($underadp + ($chdp{$acc} - $accdepth) * $shrink); + $v = round($underadp + ($chdp{$acc} - $accdepth) * $shrink); } else { $v = $underddp + $chdp{$acc} } if ($v < $maxdp) { $maxdp = $v } @@ -704,21 +701,21 @@ sub underacc { $astr .= "$v $chrs{$char} $chht{$char} ;\n"; $metrics_enc[$num] = $astr; if ($acc =~ /^$supacc$/) { - $h = int(($chwd{$char} - ($chwd{$acc} * $shrink)) / 2 + $h = round(($chwd{$char} - ($chwd{$acc} * $shrink)) / 2 + $chls{$acc} * $shrink - ($v - $accdepth * $shrink) * $itadj); } else { - $h = int(($chwd{$char} - $chwd{$acc}) / 2 + $chls{$acc} - $v * $itadj); + $h = round(($chwd{$char} - $chwd{$acc}) / 2 + $chls{$acc} - $v * $itadj); } unless (defined $hend{$char}) { findend($char, $chstrings{$char}) } $H = $h - $hend{$char} - $chls{$char}; if ($acc =~ /^$supacc$/) { $V = $underadp - $vend{$char} } - else { $V = $underddp - $vend{$char} } + else { $V = $v - $chdp{$acc} - $vend{$char} } # # Adjustment for smaller, therefore lower, shrunken accent defs # if ($acc =~ /^$supacc$/) { - $V += int($chdp{$acc} * (1 - $shrink) / $shrink); + $V += round($chdp{$acc} * (1 - $shrink) / $shrink); } $chstrings{$char} =~ /^\/$char {\n(\t.+?hsbw\n(.|\n)*?)\tendchar\n\t} $rend\n/m; $chdef = $1; @@ -752,7 +749,6 @@ sub underacc { $pstr = "/$nchar {\n$chdef % $nchar: start of $acname\n"; $pstr .= "\t$H $V rmoveto\n$acdef"; $chstrings{$nchar} = $pstr; - $chdefsnum += 1; } sub underb { @@ -765,8 +761,8 @@ sub underb { $metrics_unenc .= $old unless $metrics_unenc =~ /$old/m; $v = $underbdp + $thk; getcharinfo($char) unless defined $chwd{$char}; - $h = int(0.1 * $chwd{$char} - $underbdp * $itadj); - $l = int(0.8 * $chwd{$char}); + $h = round(0.1 * $chwd{$char} - $underbdp * $itadj); + $l = round(0.8 * $chwd{$char}); $astr = "C $num ; WX $chwd{$char} ; N $nchar ; B $chls{$char} "; $astr .= "$underbdp $chrs{$char} $chht{$char} ;\n"; $metrics_enc[$num] = $astr; @@ -781,7 +777,6 @@ sub underb { $pstr = "/$nchar {\n$chdef % $nchar: start of $acc\n"; $pstr .= "\t$H $V rmoveto\n$acdef\tendchar\n\t} $nd\n"; $chstrings{$nchar} = $pstr; - $chdefsnum += 1; } sub digraph { @@ -813,7 +808,6 @@ sub digraph { $pstr = "/$nchar {\n$chdef % $nchar: start of $acc\n"; $pstr .= "\t$H $V rmoveto\n$acdef"; $chstrings{$nchar} = $pstr; - $chdefsnum += 1; } sub max { @@ -832,6 +826,20 @@ sub min { return $a > $b ? $b : $a; } +sub round { + # + # Return nearest integer value + # + my ($num) = shift; + my $n1, $n2; + if ($num < 0) { $n1 = (0 - $num) } + else { $n1 = $num } + $n2 = int($n1); + if (($n1 - $n2) >= 0.5) { $n2++ } + if ($num < 0) { return (0 - $n2) } + else { return $n2 } +} + sub getcharinfo { # # Store character metric information @@ -995,8 +1003,8 @@ sub findend { }; $line =~ /^\t-?\d+ (-?\d+) (-?\d+) 0 callsubr$/ # Flex && do { - $hend{$char} = $1; - $vend{$char} = $2; + $hend{$char} = $1; + $vend{$char} = $2; last SWITCH; }; } diff --git a/Master/texmf-dist/doc/fonts/accfonts/vpl2ovp b/Master/texmf-dist/doc/fonts/accfonts/vpl2ovp index a49259699a8..eb88bfd3dda 100755 --- a/Master/texmf-dist/doc/fonts/accfonts/vpl2ovp +++ b/Master/texmf-dist/doc/fonts/accfonts/vpl2ovp @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -$version = 0.24; +$version = 0.25; #------------------------------------------------------------------------# $description = "Syntax: vpl2ovp -d definition-file [-s shrink-factor] diff --git a/Master/texmf-dist/doc/fonts/accfonts/vpl2vpl b/Master/texmf-dist/doc/fonts/accfonts/vpl2vpl index 18bd1c4676c..65ded28ce59 100755 --- a/Master/texmf-dist/doc/fonts/accfonts/vpl2vpl +++ b/Master/texmf-dist/doc/fonts/accfonts/vpl2vpl @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -$version = 0.24; +$version = 0.25; #------------------------------------------------------------------------# $description = "Syntax: vpl2vpl -d definition-file [-s shrink-factor] |