blob: cba13346d34561c34a7f2a53fa91ec9bef91c671 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
%%
%% This is file `uptrace.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% uplfonts.dtx (with options: `trace')
%%
%% Copyright (c) 2010 ASCII MEDIA WORKS
%% Copyright (c) 2016 Takuji Tanaka
%% Copyright (c) 2016 Japanese TeX Development Community
%%
%% This file is part of the upLaTeX2e system (community edition).
%% --------------------------------------------------------------
%%
%% File: uplfonts.dtx
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{uptrace}
[2017/08/05 v1.6h-u00 Standard upLaTeX package (font tracing)]
\RequirePackageWithOptions{tracefnt}
\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}
\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}
{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\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{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}
\plEndIncludeInRelease
\plIncludeInRelease{0000/00/00}{\adjustbaseline}
{Change zenkaku reference}%
\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}
\plEndIncludeInRelease
\endinput
%%
%% End of file `uptrace.sty'.
|