You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
font-line is a libre, open source command line tool for OpenType vertical metrics reporting and command line based font line spacing modifications. It currently supports `.ttf` and `.otf` font builds.
4
+
## About
5
+
font-line is a libre, open source command line tool for OpenType vertical metrics reporting and command line based font line spacing modifications. It supports `.ttf` and `.otf` font builds.
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:
25
+
font-line is built with Python and is tested with Python 2.7 and Python 3.5+ interpreters. You can verify your installed Python version on the command line with the command:
26
26
27
27
```
28
28
$ python --version
29
29
```
30
30
31
31
Use either of the following methods to install font-line on your system.
32
32
33
-
####pip Install
33
+
### pip Install
34
34
35
35
The latest font-line release is available through the Python Package Index and can be installed with pip:
36
36
@@ -40,7 +40,7 @@ $ pip install font-line
40
40
41
41
To upgrade to a new version of font-line after a pip install, use the command `pip install --upgrade font-line`.
42
42
43
-
####Download Project Repository and Install
43
+
### Download Project Repository and Install
44
44
45
45
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:
46
46
@@ -54,9 +54,9 @@ Navigate to the top level repository directory and enter the following command:
54
54
$ python setup.py install
55
55
```
56
56
57
-
Follow the same instructions to upgrade to a new version of the application if you elect to install with this approach.
57
+
Follow the same instructions to upgrade to a new version of the application if you install with this approach.
58
58
59
-
###Usage
59
+
## Usage
60
60
61
61
font-line works via sub-commands to the `font-line` command line executable. The following sub-commands are available:
62
62
@@ -65,7 +65,7 @@ font-line works via sub-commands to the `font-line` command line executable. Th
65
65
66
66
Usage of these sub-commands is described in detail below.
67
67
68
-
####Vertical Metrics Reporting
68
+
### Vertical Metrics Reporting
69
69
70
70
The following OpenType vertical metrics values and calculated values derived from these data are displayed with the `report` sub-command:
71
71
@@ -83,7 +83,7 @@ The following OpenType vertical metrics values and calculated values derived fro
83
83
-[head] yMax
84
84
-[head] yMin
85
85
86
-
#####`report` Sub-Command Usage
86
+
#### `report` Sub-Command Usage
87
87
88
88
Enter one or more font path arguments to the command:
89
89
@@ -97,7 +97,7 @@ Here is an example of the report generated with the Hack typeface file `Hack-Reg
You can modify the `font-report.txt` file path above to the file path string of your choice.
148
148
149
-
####Vertical Metrics Modifications
149
+
### Vertical Metrics Modifications
150
150
151
151
font-line supports automated line spacing modifications to a user-defined percentage of the units per em metric. This value will be abbreviated as UPM below.
152
152
153
-
#####`percent` Sub-Command Usage
153
+
#### `percent` Sub-Command Usage
154
154
155
155
Enter the desired percentage of the UPM 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.
156
156
@@ -170,7 +170,7 @@ The original font file is preserved in an unmodified version and the modified fi
170
170
171
171
You can inspect the vertical metrics in the new font file with the `report` sub-command (see Usage above).
172
172
173
-
#####Details of Font Metrics Changes with `percent` Sub-Command
173
+
#### Details of Font Metrics Changes with `percent` Sub-Command
174
174
175
175
The interpretation and display of these multiple vertical metrics values is platform and application dependent. [There is no broadly accepted "best" approach](https://github.com/source-foundry/font-line/issues/2). As such, font-line attempts to preserve the original metrics design in the font when modifications are made with the `percent` sub-command.
176
176
@@ -219,17 +219,17 @@ Where metrics are defined as:
219
219
220
220
Note that the internal leading modifications are split evenly across [hhea] Ascent & Descent values, and across [OS/2] WinAscent & WinDescent values. We add half of the new [OS/2] TypoLineGap value to the original [OS/2] TypoAscender or TypoDescender in order to define these new metrics properties. The [hhea] linegap value is always defined as zero.
221
221
222
-
####Important
222
+
### Important
223
223
224
224
The newly defined vertical metrics values can lead to clipping of glyph components if not properly defined. There are no tests in font-line to provide assurance that this does not occur. We assume that the user is versed in these issues before use of the application and leave this testing to the designer / user before the modified fonts are used in a production setting.
225
225
226
226
227
-
###Issue Reporting
227
+
## Issue Reporting
228
228
229
229
Please [submit a new issue report](https://github.com/source-foundry/font-line/issues/new) on the project repository.
230
230
231
231
232
-
###Acknowledgments
232
+
## Acknowledgments
233
233
234
234
font-line is built with the fantastic [fontTools](https://github.com/behdad/fonttools) Python library.
0 commit comments