summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/microtype/test-microtype.tex
blob: 8933afd007ee139391c0e79d4de22aba7094fd57 (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
%%
%% This is file `test-microtype.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% microtype.dtx  (with options: `test')
%% 
%% ------------------------------------------------------------------------
%% 
%%                       The `microtype' package
%%         Subliminal refinements towards typographical perfection
%%           Copyright (c) 2004--2023 R Schlicht <w.m.l@gmx.net>
%% 
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
%% your option) any later version. The latest version of this license is in:
%% https://www.latex-project.org/lppl.txt, and version 1.3c or later is part
%% of all distributions of LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% This work consists of the files microtype.dtx, microtype-utf.dtx and
%% microtype.ins and the derived files microtype.sty, microtype-pdftex.def,
%% microtype-luatex.def, microtype-xetex.def, microtype.lua, letterspace.sty
%% and microtype-show.sty.
%% 
%% ------------------------------------------------------------------------
%%   This file might be useful to test protrusion settings for a font.
%%   You may do with it whatever you want.
%% ------------------------------------------------------------------------ 
%%
\documentclass{article}
%% options are passed through to microtype
\usepackage[stretch=50]{microtype-show}

%% options for microtype-show
\ShowGlyphIndextrue
\ShowMissingGlyphstrue
\def\GlyphScaleFactor{2}

%% load any required font packages:
\ifpdftex
 \usepackage[T1]{fontenc}
\else
 \usepackage{fontspec}
\fi

\begin{document}
\microtypesetup{expansion=false}

%% load your font here:

\ShowCharacterInheritance

\newpage
\ShowProtrusion

\newpage
%% show single glyphs
 %\ShowDummyLine
 %\ShowProtrusionLineGlyph{A}
 %\ShowProtrusionLineIndex{27}

%% loop through all glyphs of the font;
%% protrusion values are shown in 1000th of 1em
 \ShowProtrusionDefined

 %\ShowProtrusionMissing

 %\ShowProtrusionAll

\newpage %% -------------------------------------------------------------------
This is the current font stretched by 5\%, normal, and shrunk by 5\%:

\newlength{\MTln}
\newcommand*\teststring
  {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}
\settowidth{\MTln}{\teststring}
\microtypesetup{expansion=true}

\bigskip\noindent\parbox{1.05\MTln}{\teststring\linebreak\\\teststring}\par
\bigskip\noindent\parbox{0.95\MTln}{\teststring}
\end{document}
\endinput
%%
%% End of file `test-microtype.tex'.