From 1669a34c8f26c79e1f43056b8dcdcdbccb46d0a7 Mon Sep 17 00:00:00 2001 From: Bruce Miller Date: Sun, 11 Aug 2024 14:22:34 -0400 Subject: [PATCH] Revert "Slightly more robust coding" which really was changes to Fontmap that weren't yet ready for inclusion This reverts commit 8144738d99b65c914dea85b443de5d25608b5ab3. --- lib/LaTeXML/Common/Font/Metric.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/LaTeXML/Common/Font/Metric.pm b/lib/LaTeXML/Common/Font/Metric.pm index 6800a197a..a2f8034c6 100644 --- a/lib/LaTeXML/Common/Font/Metric.pm +++ b/lib/LaTeXML/Common/Font/Metric.pm @@ -101,7 +101,7 @@ sub read_tfm { my ($skip, $next, $op, $remainder); ($skip, $next) = unpack "CC", $lig_kern[0]; if (($skip == 255) && (defined $$fontmap[$next])) { - $$self{boundary} = (ref $$fontmap[$next] ? $$fontmap[$next][0] : $$fontmap[$next]); } + $$self{boundary} = $$fontmap[$next]; } ($skip, $next, $op, $remainder) = unpack "CCCC", $lig_kern[-1]; if ($skip == 255) { $self->process_lig_kern("boundary", \@lig_kern, 256 * $op + $remainder, $fontmap, \@kern); } @@ -109,8 +109,7 @@ sub read_tfm { # Interpret char_info (for w,h,d,ital) and lig_kern program my $sizes = $$self{sizes}; for (my $code = $bc ; $code <= $ec ; $code++) { - my $mapentry = $$fontmap[$code]; - my $char = (ref $mapentry ? $$mapentry[0] : $mapentry); + my $char = $$fontmap[$code]; if (defined $char) { my ($wloc, $hdloc, $ixloc, $remainder) = unpack "C4", $char_info[$code]; my ($hloc, $dloc, $iloc, $tag) = ($hdloc >> 4, $hdloc & 0x0F, $ixloc >> 2, $ixloc & 0x03); @@ -153,15 +152,12 @@ sub process_lig_kern { $prognum = 256 * $op + $remainder; $firstinstr = 0; next; } $next = $$fontmap[$next]; - $next = $$next[0] if ref $next; my $pair = $char . $next; if (($op >= 128) && !exists $$kerns{$pair}) { $$kerns{$pair} = $$kernref[256 * ($op - 128) + $remainder]; } if (($op < 128) && !exists $$ligs{$pair}) { my ($pass, $keepc, $keepn) = ($op >> 2, ($op >> 1) & 0x01, $op & 0x01); - my $rchar = $$fontmap[$remainder]; - $rchar = $$rchar[0] if ref $rchar; - my $lig = ($keepc ? $char : "") . $rchar . ($keepn ? $next : ''); + my $lig = ($keepc ? $char : "") . $$fontmap[$remainder] . ($keepn ? $next : ''); $$ligs{$pair} = [$lig, $pass]; } # ligature & number of chars to "passover" (always 0???) last if ($skip >= 128); $prognum += $skip + 1;