File: kerning.tex

package info (click to toggle)
freetype 2.13.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,384 kB
  • sloc: ansic: 153,848; cpp: 13,981; python: 5,909; sh: 4,486; xml: 1,439; makefile: 676; perl: 340; awk: 142; javascript: 82
file content (49 lines) | stat: -rw-r--r-- 891 bytes parent folder | download
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
% kerning.tex
%
% written 2022 by Werner Lemberg <wl@gnu.org>


% This file contains a graphic used for the 'FreeType Glyph Conventions'
% tutorial, part 4, 'Kerning'.


% Here is one possibility to convert this LaTeX file to both PNG and SVG
% formats.
%
%   xelatex kerning.tex
%
%   pdftoppm -f 1 -l 4 -png -r 120 kerning.pdf kerning
%   optipng kerning-*.png
%
%   for i in 1 2 3 4; do
%     pdf2svg kerning.pdf kerning-$i.svg $i
%   done

\documentclass[multi={img},
               border=3mm]{standalone}

\usepackage{fontspec}
\usepackage{libertinus}


\begin{document}

\begin{img}
B\kern0pt R\kern0pt A\kern0pt V\kern0pt O
\end{img}

\begin{img}
BRAVO
\end{img}

\begin{img}
T\kern0pt .\kern2pt W\kern0pt .\kern2pt Lewis
{\tiny becomes}
T\kern-1pt .\kern2pt W\kern-2pt .\kern3pt Lewis
\end{img}

\begin{img}
T\kern-1pt .\kern1pt W\kern-2pt .\kern1pt Lewis
\end{img}

\end{document}