Debian Codegraph @

texmf-dist/doc/latex/microtype/test-microtype.tex

raw
1 %%
2 %% This is file `test-microtype.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% microtype.dtx (with options: `test')
8 %%
9 %% ------------------------------------------------------------------------
10 %%
11 %% The `microtype' package
12 %% Subliminal refinements towards typographical perfection
13 %% Copyright (c) 2004--2026 R Schlicht <[email protected]>
14 %%
15 %% This work may be distributed and/or modified under the conditions of the
16 %% LaTeX Project Public License, either version 1.3c of this license or (at
17 %% your option) any later version. The latest version of this license is in:
18 %% https://www.latex-project.org/lppl.txt, and version 1.3c or later is part
19 %% of all distributions of LaTeX version 2005/12/01 or later.
20 %%
21 %% This work has the LPPL maintenance status `maintained'.
22 %%
23 %% This work consists of the files microtype.dtx, microtype-utf.dtx and
24 %% microtype.ins and the derived files microtype.sty, microtype-pdftex.def,
25 %% microtype-luatex.def, microtype-xetex.def, microtype.lua, letterspace.sty
26 %% and microtype-show.sty.
27 %%
28 %% ------------------------------------------------------------------------
29 %% This file might be useful to test protrusion settings for a font.
30 %% You may do with it whatever you want.
31 %% ------------------------------------------------------------------------
32 %%
33 \documentclass{article}
34 %% options are passed through to microtype
35 \usepackage[stretch=50]{microtype-show}
36
37 %% options for microtype-show
38 \ShowGlyphIndextrue
39 \ShowMissingGlyphstrue
40 \def\GlyphScaleFactor{2}
41
42 %% load any required font packages:
43 \ifpdftex
44 \usepackage[T1]{fontenc}
45 \else
46 \usepackage{fontspec}
47 \fi
48
49 \begin{document}
50 \microtypesetup{expansion=false}
51
52 %% load your font here:
53
54 \ShowCharacterInheritance
55
56 \newpage
57 \ShowProtrusion
58
59 \newpage
60 %% show single glyphs
61 %\ShowDummyLine
62 %\ShowProtrusionLineGlyph{A}
63 %\ShowProtrusionLineIndex{27}
64
65 %% loop through all glyphs of the font;
66 %% protrusion values are shown in 1000th of 1em
67 \ShowProtrusionDefined
68
69 %\ShowProtrusionMissing
70
71 %\ShowProtrusionAll
72
73 \newpage %% -------------------------------------------------------------------
74 This is the current font stretched by 5\%, normal, and shrunk by 5\%:
75
76 \newlength{\MTln}
77 \newcommand*\teststring
78 {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}
79 \settowidth{\MTln}{\teststring}
80 \microtypesetup{expansion=true}
81
82 \bigskip\noindent\parbox{1.05\MTln}{\teststring\linebreak\\\teststring}\par
83 \bigskip\noindent\parbox{0.95\MTln}{\teststring}
84 \end{document}
85 \endinput
86 %%
87 %% End of file `test-microtype.tex'.