Skip to content

Commit 7cd561e

Browse files
committed
updated README file, clarifications
1 parent 7fb4396 commit 7cd561e

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
### About
5-
font-line is a libre open source command line tool for font vertical metrics reporting and line spacing modifications. It currently supports reporting and modifications of `.ttf` and `.otf` font builds.
5+
font-line is a libre open source command line tool for font vertical metrics reporting and line spacing modifications. It currently supports `.ttf` and `.otf` font builds.
66

77
### Contents
88

@@ -15,16 +15,24 @@ font-line is a libre open source command line tool for font vertical metrics rep
1515

1616
### Install
1717

18-
font-line is built with Python and can be used on systems with Python 2.7+ and Python 3.3+ interpreters. Use either of the following methods to install font-line on your system.
18+
font-line is built with Python and can be used on systems with Python 2.7+ and Python 3.3+ interpreters, including current releases of pypy and pypy3. You can verify your installed Python version on the command line with the command:
19+
20+
```
21+
$ python --version
22+
```
23+
24+
Use either of the following methods to install font-line on your system.
1925

2026
#### pip Install
2127

22-
The latest release version is available through the Python Package Index and can be installed with pip:
28+
The latest font-line release is available through the Python Package Index and can be installed with pip:
2329

2430
```
2531
$ pip install font-line
2632
```
2733

34+
To upgrade to a new version of font-line after a pip install, use the command `pip install --upgrade font-line`.
35+
2836
#### Download Project Repository and Install
2937

3038
The current repository version (which may be ahead of the PyPI release) can be installed by [downloading the repository](https://github.com/source-foundry/font-line/archive/master.zip) or cloning it with git:
@@ -39,11 +47,13 @@ Navigate to the top level repository directory and enter the following command:
3947
$ python setup.py install
4048
```
4149

50+
Follow the same instructions to upgrade to a new version of the application if you elect to install with this approach.
51+
4252
### Usage
4353

44-
font-line works via sub-commands to the `font-line` executable. The following sub-commands are available:
54+
font-line works via sub-commands to the `font-line` command line executable. The following sub-commands are available:
4555

46-
- `percent` - modify the line spacing of a font to a percent of the Ascender to Descender delta value
56+
- `percent` - modify the line spacing of a font to a percent of the Ascender to Descender distance
4757
- `report` - report OpenType metrics values for a font
4858

4959
Usage of these sub-commands is described in detail below.
@@ -70,8 +80,13 @@ Enter one or more font path arguments to the command:
7080
$ font-line report [fontpath 1] <fontpath ...>
7181
```
7282

73-
Here is an example of the report generated with `font-line report`:
83+
Here is an example of the report generated with the Hack typeface file `Hack-Regular.ttf` using the command:
7484

85+
```
86+
$ font-line report Hack-Regular.ttf
87+
```
88+
89+
##### Example Font Vertical Metrics Report
7590
```
7691
=== Hack-Regular.ttf ===
7792
Version 2.019; ttfautohint (v1.4.1) -l 4 -r 80 -G 350 -x 0 -H 181 -D latn -f latn -w G -W -t -X ""
@@ -103,19 +118,23 @@ Descent to TypoDescender: -9
103118
TypoLineGap / UPM: 0.2
104119
```
105120

121+
The report includes the font version string, a SHA-1 hash digest of the font file, and OpenType table metrics that are associated with line spacing in the font.
122+
106123
Unix/Linux/OS X users can write this report to a file with the `>` command line idiom:
107124

108125
```
109126
$ font-line report TheFont.ttf > font-report.txt
110127
```
111128

129+
You can modify `font-report.txt` to the file path of your choice.
130+
112131
#### Vertical Metrics Modifications
113132

114133
font-line supports automated line spacing modifications to a user-defined percentage of the TypoAscender to TypoDescender metric (often defined with the same value as the font units per em metric). This delta value will be abbreviated as TA:TD below.
115134

116135
##### `percent` Sub-Command Usage
117136

118-
Enter the desired percentage of the TA:TD metric as the first argument to the command. This should be formatted as an integer value. Then enter one or more font paths to which you would like to apply your font metrics changes.
137+
Enter the desired percentage of the TA:TD metric as the first argument to the command. This should be *entered as an integer value*. Then enter one or more font paths to which you would like to apply your font metrics changes.
119138

120139
```
121140
$ font-line percent [percent change] [fontpath 1] <fontpath ...>
@@ -131,11 +150,11 @@ Increase or decrease the integer value to increase or decrease your line spacing
131150

132151
The original font file is preserved in an unmodified version and the modified file write takes place on a new path defined as `[original filename]-linegap[percent].[ttf|otf]`. The path to the file is reported to you in the standard output after the modification is completed. font-line does not modify the glyph set or hints applied to the font. See the Details section below for a description of the OpenType table modifications that occur when the application is used on a font file.
133152

134-
You can inspect the new vertical metrics in the new font file with the `report` subcommand (see Usage above).
153+
You can inspect the vertical metrics in the new font file with the `report` subcommand (see Usage above).
135154

136155
##### Details of Font Metrics Changes with `percent` Sub-Command
137156

138-
The interpretation of the multiple vertical metric values is platform and application dependent. This has led to [debate over the 'best' approach to font line spacing](https://grahamwideman.wikispaces.com/Font+Vertical+Metrics). The line spacing modification approach used in font-line is defined with a slightly modified version of Karsten Lücke's approach that is described [here](http://www.kltf.de/downloads/FontMetrics-kltf.pdf).
157+
The interpretation of these multiple vertical metric values is platform and application dependent. This has led to [debate over the 'best' approach to cross-platform typeface line spacing](https://grahamwideman.wikispaces.com/Font+Vertical+Metrics). The line spacing modification approach used in font-line is defined with a slightly modified version of Karsten Lücke's approach that is described [here](http://www.kltf.de/downloads/FontMetrics-kltf.pdf).
139158

140159
*The following values are preserved from the original font design*:
141160

0 commit comments

Comments
 (0)