Last active
October 17, 2022 15:10
-
-
Save aminophen/6715ae7fce5e03ddecccf06e7569682a to your computer and use it in GitHub Desktop.
[pTeX] New feature candidates for JIS-encoded or UCS-encoded TFM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%#!ptex, uptex, eptex, euptex | |
\nonstopmode | |
\tracingonline1 | |
\tracingoutput1 | |
\showboxdepth10000 | |
\showboxbreadth10000 | |
\newlinechar10 | |
\font\x=zpl-Regular-tlf-t1 | |
\font\y=zpl-Italic-tlf-t1 scaled 2 | |
\font\z=zpl-Bold-tlf-t1 at 5pt | |
\font in jis \w=zpl-BoldItalic-tlf-t1 | |
\font in ucs \v=zpl-Slanted-tlf-t1 | |
\font\ja=jis | |
\font in jis\jb=jisg | |
\font in ucs\jc=upjisr-h | |
\font in ucs\jd=upjisg-h at 7pt | |
\font\je=jis-v | |
\font in jis\jf=jisg-v | |
\font in ucs\jg=upjisr-v | |
\font in ucs\jh=upjisg-v scaled 2 | |
\def\FONTNAME#1{\ifx#1\relax\else\write16{#1:\fontname#1}\expandafter\FONTNAME\fi} | |
\FONTNAME\x\y\z\w\v\ja\jb\jc\jd\je\jf\jg\jh\relax | |
\ifx\ptexfontname\undefined \expandafter\end \fi | |
\show\ptexfontname | |
\show\ptexrevision | |
\show\uptexrevision | |
\def\FONTNAME#1{\ifx#1\relax\else\write16{#1:\ptexfontname#1}\expandafter\FONTNAME\fi} | |
\FONTNAME\x\y\z\w\v\ja\jb\jc\jd\je\jf\jg\jh\relax | |
\end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%#!ptex, uptex, eptex, euptex | |
\nonstopmode | |
\tracingonline1 | |
\tracingoutput1 | |
\showboxdepth10000 | |
\showboxbreadth10000 | |
\edef\TRACINGFONTS{% | |
\ifx\tracingfonts\undefined\else | |
\tracingfonts % luatex | |
\fi | |
\ifx\pdftracingfonts\undefined\else | |
\pdftracingfonts % pdftex | |
\fi | |
\ifx\ptextracingfonts\undefined\else | |
\ptextracingfonts % (e)(u)ptex development | |
\fi | |
\ifx\XeTeXtracingfonts\undefined\else | |
\XeTeXtracingfonts % xetex | |
\fi} | |
\expandafter\let\expandafter\TracingFonts\TRACINGFONTS | |
\show\TracingFonts | |
\font\x=zpl-Regular-tlf-t1 | |
\font\y=zpl-Italic-tlf-t1 scaled 2 | |
\font\z=zpl-Bold-tlf-t1 at 5pt | |
\font in jis \w=zpl-BoldItalic-tlf-t1 | |
\font in ucs \v=zpl-Slanted-tlf-t1 | |
\font\ja=jis | |
\font in jis\jb=jisg | |
\font in ucs\jc=upjisr-h | |
\font in ucs\jd=upjisg-h at 7pt | |
\font\je=jis-v | |
\font in jis\jf=jisg-v | |
\font in ucs\jg=upjisr-v | |
\font in ucs\jh=upjisg-v scaled 2 | |
\def\TEST{\showthe\TracingFonts | |
\x R \y I \z B \w BI \v SL | |
\hbox{\yoko\ja 漢 \jb 漢 \jc 漢 \jd 漢} | |
\hbox{\tate\je 漢 \jf 漢 \jg 漢 \jh 漢} | |
} | |
% default: 0 | |
\shipout\vbox{\TEST} | |
% set 1 | |
\TracingFonts1 | |
\shipout\vbox{\TEST} | |
% set 2; only for (e)(u)ptex development | |
\TracingFonts2 | |
\shipout\vbox{\TEST} | |
\end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%#!e(u)ptex -ini -etex | |
\let\dump\relax | |
\input plain | |
\newlinechar=`^^J | |
\show\toucs | |
\show\tojis | |
\show\ptexrevision | |
\show\uptexrevision | |
\show\jobname | |
\newcount\tempcnta | |
\newcount\CharCount | |
\xdef\KINTERNAL{% | |
\ifnum\ucs"3000="3000 \string\ucs | |
\else\ifnum\euc"A1A1="A1A1 \string\euc | |
\else\ifnum\sjis"8140="8140 \string\sjis | |
\fi\fi\fi} | |
{\escapechar-1 \xdef\CHAR{\string\char}\xdef\OMCHAR{\string\omathchar}} | |
\def\CC#1{\expandafter\StripChar#1} | |
\expandafter\def\expandafter\StripChar\expandafter#\expandafter1\CHAR#2{#2} | |
\def\OC#1{\expandafter\StripOChar#1} | |
\expandafter\def\expandafter\StripOChar\expandafter#\expandafter1\OMCHAR#2{#2} | |
\CharCount=0\relax | |
\tempcnta=0\relax | |
\loop\ifnum\tempcnta<"110000\relax | |
%\iffontchar\jfont\tempcnta\relax | |
\ifnum\jis\tojis\tempcnta=\tempcnta\relax | |
\advance\CharCount by 1\relax | |
\ifx\omathchardef\undefined %%%%% | |
\message{^^J\KINTERNAL\the\tempcnta\space | |
= \string\jis\tojis\tempcnta} | |
\else %%%%% | |
\chardef\KnjInternal=\tempcnta\relax | |
\omathchardef\KnjJIS=\tojis\tempcnta\relax | |
\message{^^J\KINTERNAL\CC{\meaning\KnjInternal} | |
= \string\jis\OC{\meaning\KnjJIS} (\Uchar\tempcnta)} | |
\fi %%%%% | |
\fi | |
%\fi | |
\advance\tempcnta by 1\relax | |
\repeat | |
\message{^^JNumber of valid characters: \the\CharCount^^J} | |
% => for pTeX, should be 8836 (= 94 x 94) | |
% => for upTeX, should be 6879 (JIS X 0208) | |
\end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%#!uptex, euptex | |
\ifnum\jis"2121="3000 \else \expandafter\end \fi | |
\kcatcode"D8=16\relax | |
\font in jis\x=jis \x | |
\font\y=cmtt10 \y | |
\newlinechar`^^J | |
\shipout\vbox{} | |
\def\TEST{\message{^^J\string\tracinglostchars=\the\tracinglostchars}\shipout\vbox{ó \char"A1}} | |
\TEST | |
\tracinglostchars0 \TEST | |
\tracinglostchars1 \TEST | |
\tracinglostchars2 \TEST | |
\tracinglostchars3 \TEST | |
\tracingonline1 | |
\tracinglostchars0 \TEST | |
\tracinglostchars1 \TEST | |
\tracinglostchars2 \TEST | |
\tracinglostchars3 \TEST | |
\end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
補足