Debian Codegraph @

texmf-dist/doc/latex/pgf-periodictable/manualfiles/pgfPT_zh_fonts.tex

raw
1 % !TeX TS-program = XeLaTeX
2
3 \documentclass{article}
4
5 \usepackage{fontspec}[2020/02/03]
6 \setmainfont{Verdana}
7 \usepackage{tikz}
8
9 \usepackage[active,tightpage]{preview}
10 \PreviewEnvironment{tikzpicture}
11 \setlength\PreviewBorder{0pt}%
12
13 \newcount\nl\nl=1\relax% line number
14 \newcount\nc\nc=0\relax% column number
15 \newdimen\wdc\wdc=75pt\relax% column width
16
17 % TeX Live 2024 Fonts:
18 % FandolSong,FandolFang,FandolHei,FandolKai,AR PL SungtiL GB,AR PL KaitiM GB (collection-langcjk + collection-langchinese)
19 % Microsoft Fonts:
20 % Win10 & 11: SimSun & SimSun-ExtB
21 % Win10 & 11: Microsoft YaHei & Microsoft YaHei UI
22 % Win10 & 11: Microsoft JhengHei & Microsoft JhengHei UI
23
24 % Testing the Fonts:
25 \def\pgfPTzhTF#1{\begingroup\setmainfont{\typeface}#1\endgroup}
26
27 \begin{document}
28 \begin{tikzpicture}[every node/.style={below right,text depth=0pt}]
29 \node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
30 at (0,0) {\bfseries ELEMENT};
31 \foreach \element in {hydrogen,\ldots,lawrencium,%
32 rutherfordium,dubnium,seaborgium,bohrium,hassium,meitnerium,darmstadtium,%
33 roentgenium,copernicium,nihonium,flerovium,livermorium,tennessine,oganesson%
34 }%
35 {%
36 \node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
37 at (0,-14pt*\nl) {\element};
38 \global\advance\nl by1\relax%
39 }%
40 % ------------- BabelStoneHan Font ---------------------------------------------------------
41 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,fill=green!5]
42 at (100pt,14pt) {\itshape\resizebox{.9\wdc}{\height}{BabelStone Fonts}};%
43 \foreach \typeface in {BabelStone Han}
44 {
45 \global\nl=1\relax%
46 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
47 at (100pt+\wdc*\nc,0) {\bfseries\resizebox{.9\wdc}{\height}{\typeface}};
48 \foreach \zhElement in {氢,\ldots,铹,𬬻,𬭊,𬭳,𬭛,𬭶,鿏,𫟼,𬬭,鿔,鿭,𫓧,𫟷,鿬,鿫}{
49 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw,fill=green!5]
50 at (100pt+\wdc*\nc,-14pt*\nl) {\pgfPTzhTF{\zhElement}};
51 \global\advance\nl by1\relax%
52 }
53 \global\advance\nc by1\relax%
54 }
55 % ------------- Win Fonts -------------------------------------------------------------------
56 \node[minimum height=14pt,text width=5*\wdc,align=center,inner sep=0pt,fill=orange!10]
57 at (100pt+\wdc,14pt) {\itshape Windows 10 \& Windows 11 Fonts};%
58 \foreach \typeface in {SimSun,SimSun-ExtB,Microsoft YaHei,Microsoft JhengHei,MingLiU-ExtB}
59 {
60 \global\nl=1\relax%
61 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
62 at (100pt+\wdc*\nc,0) {\bfseries\setbox0=\hbox{\typeface}%
63 \ifdim\wd0>.9\wdc\relax\resizebox{.9\wdc}{\height}{\typeface}\else%
64 \typeface\fi};
65 \foreach \zhElement in {氢,\ldots,铹,𬬻,𬭊,𬭳,𬭛,𬭶,鿏,𫟼,𬬭,鿔,鿭,𫓧,𫟷,鿬,鿫}{
66 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
67 at (100pt+\wdc*\nc,-14pt*\nl) {\pgfPTzhTF{\zhElement}};
68 \global\advance\nl by1\relax%
69 }
70 \global\advance\nc by1\relax%
71 }
72 % ------------- «newline» -------------------------------------------
73 \node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
74 at (0,-266pt) {\bfseries ELEMENT};
75 \global\advance\nl by2\relax%
76 \global\nc=0\relax%
77 \foreach \element in {hydrogen,\ldots,lawrencium,%
78 rutherfordium,dubnium,seaborgium,bohrium,hassium,meitnerium,darmstadtium,%
79 roentgenium,copernicium,nihonium,flerovium,livermorium,tennessine,oganesson%
80 }%
81 {%
82 \node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
83 at (0,-14pt*\nl) {\element};
84 \global\advance\nl by1\relax%
85 }%
86 % ------------- TeX Live 2024 Fonts --------------------------------
87 \node[minimum height=14pt,text width=6*\wdc,align=center,inner sep=0pt,fill=red!10]
88 at (100pt,-252pt) {\itshape TeX Live 2024 Fonts};%
89 \foreach \typeface in {FandolSong,FandolFang,FandolHei,FandolKai,AR PL SungtiL GB,AR PL KaitiM GB}
90 {
91 \global\nl=1\relax%
92 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
93 at (100pt+\wdc*\nc,-266pt) {\bfseries\setbox0=\hbox{\typeface}%
94 \ifdim\wd0>.9\wdc\relax\resizebox{.9\wdc}{\height}{\typeface}\else%
95 \typeface\fi};
96 \foreach \zhElement in {氢,\ldots,铹,𬬻,𬭊,𬭳,𬭛,𬭶,鿏,𫟼,𬬭,鿔,鿭,𫓧,𫟷,鿬,鿫}{
97 \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
98 at (100pt+\wdc*\nc,-266pt-14pt*\nl) {\pgfPTzhTF{\zhElement}};
99 \global\advance\nl by1\relax%
100 }
101 \global\advance\nc by1\relax%
102 }
103
104 \end{tikzpicture}
105 \end{document}