%%
%% This is file `ptrace.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% plfonts.dtx  (with options: `trace')
%% 
%% Copyright (c) 2010 ASCII MEDIA WORKS
%% Copyright (c) 2016-2020 Japanese TeX Development Community
%% 
%% This file is part of the pLaTeX2e system (community edition).
%% -------------------------------------------------------------
%% 
%% File: plfonts.dtx
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{ptrace}
     [2020/03/26 v1.7e Standard pLaTeX package (font tracing)]
\RequirePackageWithOptions{tracefnt}
\plIncludeInRelease{2020/04/12}{\selectfont}
                   {Check \KanjiEncodingPair}%
\DeclareRobustCommand\selectfont{%
  \let\tmp@error@fontshape\error@fontshape
  \let\error@fontshape\error@kfontshape
  \edef\tmp@item{{\k@encoding}}%
  \expandafter\expandafter\expandafter
  \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}%
  \ifin@
    \let\cy@encoding\k@encoding
    \ensure@KanjiEncodingPair{t}%
    \edef\ct@encoding{\csname t@enc@\k@encoding\endcsname}%
  \else
    \expandafter\expandafter\expandafter
    \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}%
    \ifin@
      \let\ct@encoding\k@encoding
      \ensure@KanjiEncodingPair{y}%
      \edef\cy@encoding{\csname y@enc@\k@encoding\endcsname}%
    \else
      \@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha
    \fi
  \fi
  \let\font\tfont
  \let\k@encoding\ct@encoding
  \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}%
  \pickup@font
  \font@name
  \let\font\jfont
  \let\k@encoding\cy@encoding
  \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}%
  \pickup@font
  \font@name
  \expandafter\def\expandafter\k@encoding\tmp@item
  \kenc@update
  \let\error@fontshape\tmp@error@fontshape
  \if@knjcmd \@knjcmdfalse
    \expandafter\ifx
    \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname\relax
      \expandafter\ifx
         \csname rel@\k@encoding/\k@family/\k@series/all\endcsname\relax
      \else
         \csname rel@\k@encoding/\k@family/\k@series/all\endcsname
      \fi
    \else
       \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname
    \fi
  \fi
  \let\font\afont
  \xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}%
  \pickup@font
  \font@name
  \ifnum \tracingfonts>\tw@
    \@font@info{Roman:Switching to \font@name}\fi
  \enc@update
  \ifx\f@linespread\baselinestretch \else
    \set@fontsize\baselinestretch\f@size\f@baselineskip
  \fi
  \size@update}
\plEndIncludeInRelease
\plIncludeInRelease{0000/00/00}{\selectfont}
                   {ASCII Corporation original}%
\DeclareRobustCommand\selectfont{%
  \let\tmp@error@fontshape\error@fontshape
  \let\error@fontshape\error@kfontshape
  \edef\tmp@item{{\k@encoding}}%
  \expandafter\expandafter\expandafter
  \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}%
  \ifin@
    \let\cy@encoding\k@encoding
    \edef\ct@encoding{\csname t@enc@\k@encoding\endcsname}%
  \else
    \expandafter\expandafter\expandafter
    \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}%
    \ifin@
      \let\ct@encoding\k@encoding
      \edef\cy@encoding{\csname y@enc@\k@encoding\endcsname}%
    \else
      \@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha
    \fi
  \fi
  \let\font\tfont
  \let\k@encoding\ct@encoding
  \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}%
  \pickup@font
  \font@name
  \let\font\jfont
  \let\k@encoding\cy@encoding
  \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}%
  \pickup@font
  \font@name
  \expandafter\def\expandafter\k@encoding\tmp@item
  \kenc@update
  \let\error@fontshape\tmp@error@fontshape
  \if@knjcmd \@knjcmdfalse
    \expandafter\ifx
    \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname\relax
      \expandafter\ifx
         \csname rel@\k@encoding/\k@family/\k@series/all\endcsname\relax
      \else
         \csname rel@\k@encoding/\k@family/\k@series/all\endcsname
      \fi
    \else
       \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname
    \fi
  \fi
  \let\font\afont
  \xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}%
  \pickup@font
  \font@name
  \ifnum \tracingfonts>\tw@
    \@font@info{Roman:Switching to \font@name}\fi
  \enc@update
  \ifx\f@linespread\baselinestretch \else
    \set@fontsize\baselinestretch\f@size\f@baselineskip
  \fi
  \size@update}
\plEndIncludeInRelease
\plIncludeInRelease{2017/04/08}{\set@fontsize}
                   {Construct \ystrutbox}%
\def\set@fontsize#1#2#3{%
    \@defaultunits\@tempdimb#2pt\relax\@nnil
    \edef\f@size{\strip@pt\@tempdimb}%
    \@defaultunits\@tempskipa#3pt\relax\@nnil
    \edef\f@baselineskip{\the\@tempskipa}%
    \edef\f@linespread{#1}%
    \let\baselinestretch\f@linespread
    \def\size@update{%
      \baselineskip\f@baselineskip\relax
      \baselineskip\f@linespread\baselineskip
      \normalbaselineskip\baselineskip
      \adjustbaseline
      \setbox\ystrutbox\hbox{\yoko
          \vrule\@width\z@
                \@height.7\baselineskip \@depth.3\baselineskip}%
      \setbox\tstrutbox\hbox{\tate
          \vrule\@width\z@
                \@height.5\baselineskip \@depth.5\baselineskip}%
      \setbox\zstrutbox\hbox{\tate
          \vrule\@width\z@
                \@height.7\baselineskip \@depth.3\baselineskip}%
    \ifnum \tracingfonts>\tw@
      \ifx\f@linespread\@empty
        \let\reserved@a\@empty
      \else
        \def\reserved@a{\f@linespread x}%
      \fi
      \@font@info{Changing size to\space
            \f@size/\reserved@a \f@baselineskip}%
      \aftergroup\type@restoreinfo
    \fi
        \let\size@update\relax}}
\plEndIncludeInRelease
\plIncludeInRelease{0000/00/00}{\set@fontsize}
                   {ASCII Corporation original}%
\def\set@fontsize#1#2#3{%
    \@defaultunits\@tempdimb#2pt\relax\@nnil
    \edef\f@size{\strip@pt\@tempdimb}%
    \@defaultunits\@tempskipa#3pt\relax\@nnil
    \edef\f@baselineskip{\the\@tempskipa}%
    \edef\f@linespread{#1}%
    \let\baselinestretch\f@linespread
    \def\size@update{%
      \baselineskip\f@baselineskip\relax
      \baselineskip\f@linespread\baselineskip
      \normalbaselineskip\baselineskip
      \adjustbaseline
      \setbox\strutbox\hbox{\yoko
          \vrule\@width\z@
                \@height.7\baselineskip \@depth.3\baselineskip}%
      \setbox\tstrutbox\hbox{\tate
          \vrule\@width\z@
                \@height.5\baselineskip \@depth.5\baselineskip}%
      \setbox\zstrutbox\hbox{\tate
          \vrule\@width\z@
                \@height.7\baselineskip \@depth.3\baselineskip}%
    \ifnum \tracingfonts>\tw@
      \ifx\f@linespread\@empty
        \let\reserved@a\@empty
      \else
        \def\reserved@a{\f@linespread x}%
      \fi
      \@font@info{Changing size to\space
            \f@size/\reserved@a \f@baselineskip}%
      \aftergroup\type@restoreinfo
    \fi
        \let\size@update\relax}}
\plEndIncludeInRelease
\plIncludeInRelease{2019/10/01}{\adjustbaseline}
                   {Make robust}%
\DeclareRobustCommand\adjustbaseline{%
    \setbox\adjust@box\hbox{\char\jis"3441}%"
    \cht\ht\adjust@box
    \cdp\dp\adjust@box
    \cwd\wd\adjust@box
    \cvs\normalbaselineskip
    \chs\cwd
    \cHT\cht \advance\cHT\cdp
  \iftdir
    \setbox\adjust@box\hbox{\tbaselineshift\z@ M}%
    \adjust@dimen\ht\adjust@box
    \advance\adjust@dimen\dp\adjust@box
    \advance\adjust@dimen-\cHT
    \divide\adjust@dimen\tw@
    \advance\adjust@dimen\cdp
    \advance\adjust@dimen-\dp\adjust@box
    \tbaselineshift\adjust@dimen
    \ifnum \tracingfonts>\tw@
      \typeout{baselineshift:\the\tbaselineshift}%
    \fi
  \fi}
\plEndIncludeInRelease
\plIncludeInRelease{2017/07/29}{\adjustbaseline}
                   {Change zenkaku reference}%
\def\adjustbaseline{%
    \setbox\adjust@box\hbox{\char\jis"3441}%"
    \cht\ht\adjust@box
    \cdp\dp\adjust@box
    \cwd\wd\adjust@box
    \cvs\normalbaselineskip
    \chs\cwd
    \cHT\cht \advance\cHT\cdp
  \iftdir
    \setbox\adjust@box\hbox{\tbaselineshift\z@ M}%
    \adjust@dimen\ht\adjust@box
    \advance\adjust@dimen\dp\adjust@box
    \advance\adjust@dimen-\cHT
    \divide\adjust@dimen\tw@
    \advance\adjust@dimen\cdp
    \advance\adjust@dimen-\dp\adjust@box
    \tbaselineshift\adjust@dimen
    \ifnum \tracingfonts>\tw@
      \typeout{baselineshift:\the\tbaselineshift}%
    \fi
  \fi}
\expandafter \let \csname adjustbaseline \endcsname \@undefined
\plEndIncludeInRelease
\plIncludeInRelease{0000/00/00}{\adjustbaseline}
                   {ASCII Corporation original}%
\def\adjustbaseline{%
    \setbox\adjust@box\hbox{\char\euc"A1A1}%"
    \cht\ht\adjust@box
    \cdp\dp\adjust@box
    \cwd\wd\adjust@box
    \cvs\normalbaselineskip
    \chs\cwd
    \cHT\cht \advance\cHT\cdp
  \iftdir
    \setbox\adjust@box\hbox{\tbaselineshift\z@ M}%
    \adjust@dimen\ht\adjust@box
    \advance\adjust@dimen\dp\adjust@box
    \advance\adjust@dimen-\cHT
    \divide\adjust@dimen\tw@
    \advance\adjust@dimen\cdp
    \advance\adjust@dimen-\dp\adjust@box
    \tbaselineshift\adjust@dimen
    \ifnum \tracingfonts>\tw@
      \typeout{baselineshift:\the\tbaselineshift}
    \fi
  \fi}
\expandafter \let \csname adjustbaseline \endcsname \@undefined
\plEndIncludeInRelease
\endinput
%%
%% End of file `ptrace.sty'.
