diff --git a/README.md b/README.md index 94cf139..91571f2 100644 --- a/README.md +++ b/README.md @@ -21,49 +21,13 @@ $ python3 kern_pair.py FontFile.ttf PairString ## Example ``` -$ python3 kern_pair.py Roboto-Regular.ttf --dict /usr/share/dict/words +$ python3 kern_pair.py Roboto-Regular.ttf --dict /usr/share/dict/words -l fi 0 -4 -lt 4 0 -rb 4 0 -rk 4 0 -dy 4 0 -rh 4 0 -yb 4 0 -dv 4 0 -Ti -4 0 -dt 5 0 -yh 4 0 -Ap 4 0 -Ly -1 -6 -kp 4 0 -ET -3 1 -PA -3 -7 -RT 0 -4 -FA -3 -8 -Ut 4 0 -kj 6 0 -LT -9 -13 -IX -3 1 -Aj 5 0 -GT -4 0 -Mt 4 0 -Lj 4 0 -YU -1 -5 -Ht 4 0 -Kj 6 0 -hT -7 0 -TJ -7 -12 -cT -6 0 -vb 4 0 -rZ -5 0 -oT -8 0 -vh 4 0 -Jt 4 0 -Kp 4 -1 -FJ -9 -13 -Rj 4 0 -HX -3 1 -VJ -5 0 +yt 4 0 +Te -9 -5 +To -9 -5 +TA -8 -4 +DT -5 -1 ``` The first value is the pair of letter to kern. The second value is, in percent @@ -76,23 +40,24 @@ The `-l` or `--letters-only` makes the tool only consider kerning between two letters (ie. no punctuation). The tool also ignores digits, since they typically have a fixed width and no kerning by design. -To inspect the pairs reported, you can use the `kern_pair.py` tool: +A file `kerned.pdf` is always generated, with each page showcasing one pair +the tool thinks would need adjustment: [kerned.pdf](/images/kerned.pdf) + +To inspect the pairs reported, you can use the `kern_pair.py` tool again: ``` -$ python3 kern_pair.py Roboto-Regular.ttf LT -LT autokern: -9 (-184 units) existing kern: -13 (-275 units) -Saving kern.png and kerned.png +$ python3 kern_pair.py Roboto-Regular.ttf To +To autokern: -9 (-184 units) existing kern: -5 (-99 units) +Saving kern.png ``` -In this case the tool thinks the pair "LT" is over-kerned in Roboto. +In this case the tool thinks the pair "To" is not kerned enough in Roboto. Obviously that's up to taste. But here's the two files `kern.png` -and `kerned.png` generated by the tool: +and `kerned.pdf` generated by the tool: ![kern.png](/images/kern.png) -![kerned.png](/images/kerned.png) - In the `kern.png` image, the first line is with no kerning. The second line is the tool's suggestion, and the third line is the existing font -kerning. The `kerned.png`, the pair is showcased between lower, and upper, +kerning. The `kerned.pdf`, the pair is showcased between lower, and upper, letters. The three rows, similarly, show no-kerning, tool's suggestion, and existing kern. diff --git a/images/kern.png b/images/kern.png index f39d746..69a1fa5 100644 Binary files a/images/kern.png and b/images/kern.png differ diff --git a/images/kerned.pdf b/images/kerned.pdf new file mode 100644 index 0000000..628a856 Binary files /dev/null and b/images/kerned.pdf differ diff --git a/images/kerned.png b/images/kerned.png deleted file mode 100644 index 41946fb..0000000 Binary files a/images/kerned.png and /dev/null differ