ftest.tex 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. \catcode`\@=11
  2. \input ienc
  3. \input oenc
  4. \input fsel
  5. \catcode`\@=12
  6. \tracingstats1
  7. \tracingfonts=0 % For this font sampler, too many messages.
  8. \hoffset=-.25in
  9. \hsize=7in
  10. \parindent=.5in
  11. % Avoid any over- and underfull boxes and hyphenation.
  12. \raggedbottom
  13. \tolerance=10000
  14. \hbadness=10000
  15. \hfuzz=\maxdimen
  16. \hyphenpenalty=10000
  17. \rightskip=0pt plus2pc
  18. \def\title#1{%
  19. \vfil\eject
  20. \begingroup
  21. \immediate\write16{*** #1}
  22. \setfontfamily{CMRoman}
  23. \setfontseries{bx}
  24. \setfontshape{n}
  25. \setfontsize{17}
  26. \selectfont
  27. \noindent #1\vskip12pt
  28. \endgroup
  29. }
  30. \def\dofamilies{%
  31. \begingroup
  32. \do{CMRoman}%
  33. \do{CMSans}%
  34. \do{CMMono}%
  35. \setfontencoding{T1}%
  36. \do{LMRoman}%
  37. \do{LMSans}%
  38. \do{LMMono}%
  39. \do{CMBright}
  40. \do{CMBrightMono}
  41. \do{ConcreteRoman}%
  42. \do{BeraRoman}%
  43. \do{BeraSans}%
  44. \do{BeraMono}%
  45. \do{Charter}%
  46. \do{NimbusRoman}%
  47. \do{NimbusSans}%
  48. \do{NimbusMono}%
  49. \do{URWPalladio}%
  50. \do{URWBookman}%
  51. \do{CenturySchoolbook}%
  52. \do{AntykwaTorunska}%
  53. \do{Iwona}%
  54. \do{URWGothic}%
  55. \setfontshape{it}%
  56. \do{URWChancery}%
  57. \endgroup
  58. }
  59. %
  60. % Font switching test.
  61. %
  62. \title{Font/base family switching}
  63. \begingroup
  64. \def\teststring{%
  65. \begingroup
  66. \par
  67. Default (CMRoman~OT1 medium upright 11pt)~--
  68. \setfontseries{b}\selectfont bold~--
  69. \bfseries bold extended~--
  70. \itshape italic~--
  71. \mdseries medium~--
  72. \setfontsize{14}\selectfont 14\thinspace pt~--
  73. \slshape slanted~--
  74. \setfontencoding{T1}%
  75. \setfontfamily{NimbusRoman}\selectfont NimbusRoman~T1~--
  76. \itshape italic~--
  77. \setfontfamily{NimbusSans}\selectfont NimbusSans~--
  78. \upshape upright~--
  79. \bfseries bold extended~--
  80. \setfontfamily{NimbusMono}\selectfont NimbusMono~--
  81. \setfontsize{10}\selectfont 10\thinspace pt~--
  82. \itshape italic~--
  83. \mdseries medium~--
  84. \upshape upright~--
  85. \setfontfamily{LMSans}\selectfont LMSans~--
  86. \itshape italic~--
  87. \setfontfamily{ConcreteRoman}\selectfont ConcreteRoman~--
  88. \upshape upright
  89. \vskip1pc
  90. \endgroup
  91. }
  92. Now the base family is CMRoman:
  93. \teststring
  94. \fontbasefamily NimbusSans
  95. Now the base family is NimbusSans:
  96. \teststring
  97. \endgroup
  98. %
  99. % Math test.
  100. %
  101. \title{Math}
  102. \begingroup
  103. \def\teststring{%
  104. $\displaystyle
  105. \Longrightarrow
  106. 5! - f'(x) + \Re z \times \Im z;\quad
  107. \bar u < \tilde e + \vec p - \hat x \cdot \widehat x \ge
  108. \widehat{xy} = \widehat{xyz};\allowbreak\quad
  109. \gamma, \epsilon, \varepsilon, \sigma, \varsigma, \rho, \varrho,
  110. \Gamma, {\it \Gamma};\allowbreak\quad
  111. (\exp i),\> [\mathop{\sf sin} \varphi],\>
  112. \{\mathop{\tt lim}_{x_1\to\infty} c^{-x_1}\};\allowbreak\quad
  113. \biggl(\sum_{i=1}^n a^{b_i}\biggr);\quad
  114. \int_{y_2,\ldots,y_n\ge0} x\mskip\thinmuskip dy_2;\quad
  115. (| \bigl(\big| \Bigl(\Big| \biggl(\bigg| \Biggl(\Bigg|.
  116. $
  117. }
  118. \def\testfamily#1 #2 #3 #4 {%
  119. \par
  120. \setfontfamily{#1}\selectfont
  121. \fontfamily roman #1
  122. \fontfamily sans #2
  123. \fontfamily mono #3
  124. \fontfamily math #4
  125. \hangindent=\parindent \hangafter=1
  126. \noindent #4:\quad \teststring\medskip
  127. }%
  128. \def\test{%
  129. \setfontencoding{OT1}%
  130. \testfamily CMRoman CMSans CMMono CMMath
  131. \setfontencoding{T1}%
  132. \testfamily LMRoman LMSans LMMono CMMath
  133. \testfamily ConcreteRoman LMSans LMMono EulerMath
  134. \testfamily CMBright CMBright CMBrightMono CMBrightMath
  135. \testfamily URWPalladio NimbusSans BeraMono PazoMath
  136. \testfamily URWPalladio NimbusSans BeraMono PXFontsMath
  137. \testfamily NimbusRoman NimbusSans NimbusMono TXFontsMath
  138. \testfamily NimbusRoman NimbusSans NimbusMono Belleek
  139. \testfamily Charter NimbusSans NimbusMono CharterMath
  140. \testfamily BeraSans BeraSans BeraMono ArevMath
  141. \testfamily Iwona Iwona LMMono IwonaMath
  142. }
  143. \test
  144. \vskip1pc \hrule \nobreak\vskip1pc
  145. \bfseries
  146. \test
  147. \vskip1pc \hrule \nobreak\vskip1pc
  148. \mdseries\itshape
  149. \test
  150. \vskip1pc \hrule \nobreak\vskip1pc
  151. \upshape\setfontsize{17}\selectfont
  152. \test
  153. \endgroup
  154. %
  155. % Test for relative font scaling.
  156. %
  157. \title{Relative scaling of font families}
  158. \begingroup
  159. \def\do#1{%
  160. {\setfontfamily{CMRoman}\setfontencoding{OT1}\selectfont CMRoman}\quad
  161. {\setfontfamily{#1}\selectfont #1}\smallskip
  162. }
  163. \line{\vbox{\hsize=.5\hsize \dofamilies}\qquad
  164. \vbox{\hsize=.5\hsize \setfontseries{bx}\dofamilies}}
  165. \endgroup
  166. %
  167. % Test for baseline skips.
  168. %
  169. \title{Baseline skips}
  170. \begingroup
  171. \def\do#1{%
  172. \begingroup
  173. \setfontfamily{#1}\selectfont
  174. (#1).
  175. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed
  176. bibendum nulla id ante. Suspendisse nibh elit, ultricies
  177. commodo, ultrices eget, sagittis a, erat. Praesent et
  178. augue. Morbi sem. Phasellus augue. Ut bibendum. Sed urna enim,
  179. luctus et, gravida vel, malesuada quis, velit. Fusce egestas
  180. sapien quis leo.
  181. \vskip5pt
  182. \endgroup
  183. }
  184. \dofamilies
  185. \endgroup
  186. %
  187. % Showcase for the font families we support.
  188. %
  189. \title{Font families showcase}
  190. \def\teststring{What a mess. }
  191. \def\test#1{%
  192. #1%
  193. \upshape \teststring
  194. \itshape \teststring
  195. \slshape \teststring
  196. \scshape \teststring
  197. }
  198. \def\nextfamily#1 {%
  199. \vskip2ex\relax
  200. \setfontfamily{#1}\setfontsize{11}\setfontseries{m}\setfontshape{n}\selectfont
  201. \hrule
  202. \nobreak\vskip2ex\relax
  203. }
  204. \def\nextsize#1 {%
  205. \vskip1ex
  206. \setfontsize{#1}\setfontseries{m}\setfontshape{n}\selectfont
  207. \textindent{\numwithunit{#1}:}%
  208. \test\mdseries\par
  209. \test{\setfontseries{b}\selectfont}\par
  210. \test\bfseries\par
  211. }%
  212. \def\numwithunit#1{%
  213. \def\num{#1}%
  214. \afterassignment\getunit
  215. \dimen255=#1pt\relax
  216. }%
  217. \def\getunit#1\relax{%
  218. \def\temp{#1}%
  219. \num \ifx\temp\empty \thinspace [pt]\fi
  220. }%
  221. \nextfamily CMRoman
  222. CMRoman. The ``bold'' and ``bold extended'' series are missing the
  223. ``caps and small caps'' shape. The ``italic'' and ``slanted'' shapes
  224. of the ``bold'' series are mapped to the corresponding shapes of the
  225. ``bold extended'' series.
  226. \nextsize 10
  227. \nextsize 1pc
  228. \nextfamily CMSans
  229. CMSans. For all series, ``italic'' is mapped to ``slanted''. All
  230. series are missing the ``caps and small caps'' shape. Entire ``bold''
  231. series is mapped to the ``bold extended'' series.
  232. \nextsize 10
  233. \nextsize 1pc
  234. \nextfamily CMMono
  235. CMMono. There are no ``bold'' and ``bold extended'' series. All
  236. series are missing the ``caps and small caps'' shape.
  237. \nextsize 10
  238. \nextsize 1pc
  239. \nextfamily LMRoman
  240. LMRoman. Maps to CMRoman for the OT1 encodings, so this is actually
  241. CMRoman now.
  242. \nextsize 10
  243. \nextsize 1pc
  244. \nextfamily LMSans
  245. LMSans. Maps to CMSans for the OT1 encodings, so this is actually
  246. CMSans now.
  247. \nextsize 10
  248. \nextsize 1pc
  249. \nextfamily LMMono
  250. LMMono. Maps to CMMono for the OT1 encodings, so this is actually
  251. CMMono now.
  252. \nextsize 10
  253. \nextsize 1pc
  254. \setfontencoding{T1}
  255. \nextfamily LMRoman
  256. LMRoman T1.
  257. \nextsize 10
  258. \nextsize 1pc
  259. \nextfamily LMSans
  260. LMSans T1. The ``bold'' series is mapped to the ``bold extended''
  261. series.
  262. \nextsize 10
  263. \nextsize 1pc
  264. \nextfamily LMMono
  265. LMMono T1. The ``bold'' and ``bold extended'' series are missing.
  266. \nextsize 10
  267. \nextsize 1pc
  268. \nextfamily CMBright
  269. CMBright T1.
  270. \nextsize 10
  271. \nextsize 1pc
  272. \nextfamily CMBrightMono
  273. CMBrightMono T1.
  274. \nextsize 10
  275. \nextsize 1pc
  276. \nextfamily ConcreteRoman
  277. ConcreteRoman T1. Only the T1 encoding is currently defined. The
  278. ``bold'' and ``bold extended'' series are mapped to LMSans T1.
  279. \nextsize 10
  280. \nextsize 1pc
  281. \nextfamily BeraRoman
  282. BeraRoman. The ``bold'' series maps to the ``bold extended'' series.
  283. ``Slanted'' shapes are artificially slanted. All series are missing
  284. the ``caps and small caps'' shape.
  285. \nextsize 10
  286. \nextsize 1pc
  287. \nextfamily BeraSans
  288. BeraSans. The ``bold'' series is mapped to the ``bold extended''
  289. series. All series are missing the ``caps and small caps'' shape.
  290. \nextsize 10
  291. \nextsize 1pc
  292. \nextfamily BeraMono
  293. BeraMono. The ``bold extended'' series is mapped to the ``bold''
  294. series. All series are missing the ``caps and small caps'' shape.
  295. \nextsize 10
  296. \nextsize 1pc
  297. \nextfamily Charter
  298. Charter. The ``bold'' series is mapped to the ``bold extended''
  299. series.
  300. \nextsize 10
  301. \nextsize 1pc
  302. \nextfamily NimbusRoman
  303. NimbusRoman. The ``bold'' series is mapped to the ``bold extended''
  304. series.
  305. \nextsize 10
  306. \nextsize 1pc
  307. \nextfamily NimbusSans
  308. NimbusSans. For all series, ``italic'' is mapped to ``slanted''. The
  309. ``bold'' series is mapped to the ``bold extended'' series. In one
  310. case, this results in double mapping: bx/it maps to b/it which maps
  311. to b/sl (check out the log file).
  312. \nextsize 10
  313. \nextsize 1pc
  314. \nextfamily NimbusMono
  315. NimbusMono. For all series, ``italic'' is mapped to ``slanted''. The
  316. ``bold extended'' series is mapped to the ``bold'' series. In one
  317. case, this results in double mapping: bx/it maps to b/it which maps
  318. to b/sl (check out the log file).
  319. \nextsize 10
  320. \nextsize 1pc
  321. \nextfamily URWPalladio
  322. URWPalladio. The ``bold'' series is mapped to the ``bold extended''
  323. series.
  324. \nextsize 10
  325. \nextsize 1pc
  326. \nextfamily URWBookman
  327. URWBookman. The ``bold extended'' series is mapped to the ``bold''
  328. series.
  329. \nextsize 10
  330. \nextsize 1pc
  331. \nextfamily CenturySchoolbook
  332. CenturySchoolbook. The ``bold'' series is mapped to the ``bold
  333. extended'' series.
  334. \nextsize 10
  335. \nextsize 1pc
  336. \nextfamily AntykwaTorunska
  337. AntykwaTorunska. The ``bold'' series is mapped to the ``bold
  338. extended'' series. For all series, ``slanted'' is mapped to
  339. ``italic''.
  340. \nextsize 10
  341. \nextsize 1pc
  342. \nextfamily Iwona
  343. Iwona. The ``bold extended'' series is mapped to the ``bold'' series.
  344. For all series, ``italic'' is mapped to ``slanted''.
  345. \nextsize 10
  346. \nextsize 1pc
  347. \vskip 1pc
  348. \setfontsize{10pt}\setfontseries{m}\setfontshape{n}\selectfont
  349. Iwona also supports ``light'', ``semi-bold'' and ``extra-bold''
  350. series, with ``condensed'' variants:
  351. \def\\#1{\setfontseries{#1}\selectfont\teststring}
  352. \\{l} (light).\par
  353. \\{lc} (light condensed).
  354. \\{m} (medium).\par
  355. \\{c} (medium condensed).
  356. \\{sb} (semi-bold).\par
  357. \\{sbc} (semi-bold condensed).
  358. \\{b} (bold).\par
  359. \\{bc} (bold condensed).
  360. \\{eb} (extra-bold).\par
  361. \\{ebc} (extra-bold condensed).
  362. \nextfamily URWGothic
  363. URWGothic. The ``bold extended'' series is mapped to the ``bold''
  364. series.
  365. \nextsize 10
  366. \nextsize 1pc
  367. \nextfamily URWChancery
  368. \itshape
  369. URWChancery. Only the ``medium italic'' shape is available.
  370. \nextsize 10
  371. \nextsize 1pc
  372. \bye
  373. % Local variables:
  374. % compile-command: "tex --interact=nonstopmode ftest"
  375. % page-delimiter: "^% \f"
  376. % End: