Skip to content

Commit 9a1738a

Browse files
committed
[README.md] update pypi badge formatting
1 parent 1f175b7 commit 9a1738a

File tree

1 file changed

+19
-24
lines changed

1 file changed

+19
-24
lines changed

README.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
<img src ="https://raw.githubusercontent.com/source-foundry/font-line/img/img/font-line-crunch.png" />
22

3-
4-
[![PyPI](https://img.shields.io/pypi/v/font-line.svg)](https://pypi.org/project/font-line)
3+
[![PyPI](https://img.shields.io/pypi/v/font-line?color=blueviolet&label=PyPI&logo=python&logoColor=white)](https://pypi.org/project/font-line)
54
[![Build Status](https://travis-ci.org/source-foundry/font-line.svg?branch=master)](https://travis-ci.org/source-foundry/font-line)
6-
[![Build status](https://ci.appveyor.com/api/projects/status/2s4725o5mxh2298c/branch/master?svg=true)](https://ci.appveyor.com/project/chrissimpkins/font-line/branch/master)
5+
[![Build status](https://ci.appveyor.com/api/projects/status/2s4725o5mxh2298c/branch/master?svg=true)](https://ci.appveyor.com/project/chrissimpkins/font-line/branch/master)
76
[![codecov.io](https://codecov.io/github/source-foundry/font-line/coverage.svg?branch=master)](https://codecov.io/github/source-foundry/font-line?branch=master)
87
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d77b55866c794a5a9dd3b3dfea9ec318)](https://www.codacy.com/app/SourceFoundry/font-line)
98

109
## About
11-
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.
10+
11+
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.
1212

1313
## Contents
1414

1515
- [Install Guide](https://github.com/source-foundry/font-line#install)
16-
- [Usage](https://github.com/source-foundry/font-line#usage)
17-
- [Vertical Metrics Reporting](https://github.com/source-foundry/font-line#vertical-metrics-reporting)
18-
- [Line Spacing Modifications](https://github.com/source-foundry/font-line#vertical-metrics-modifications)
16+
- [Usage](https://github.com/source-foundry/font-line#usage) - [Vertical Metrics Reporting](https://github.com/source-foundry/font-line#vertical-metrics-reporting) - [Line Spacing Modifications](https://github.com/source-foundry/font-line#vertical-metrics-modifications)
1917
- [Changelog](https://github.com/source-foundry/font-line/blob/master/CHANGELOG.md)
2018
- [License](https://github.com/source-foundry/font-line/blob/master/docs/LICENSE.md)
2119

@@ -64,7 +62,7 @@ Follow the same instructions to upgrade to a new version of the application if y
6462

6563
## Usage
6664

67-
font-line works via sub-commands to the `font-line` command line executable. The following sub-commands are available:
65+
font-line works via sub-commands to the `font-line` command line executable. The following sub-commands are available:
6866

6967
- `percent` - modify the line spacing of a font to a percent of the Ascender to Descender distance
7068
- `report` - report OpenType metrics values for a font
@@ -104,6 +102,7 @@ $ font-line report Hack-Regular.ttf
104102
```
105103

106104
#### Example Font Vertical Metrics Report
105+
107106
```
108107
=== Hack-Regular.ttf ===
109108
Version 3.003;[3114f1256]-release
@@ -197,34 +196,33 @@ where external leading is defined as:
197196
MAX(0, hhea.LineGap - ((OS/2.WinAscent + OS/2.winDescent) - (hhea.Ascent - hhea.Descent)))
198197
```
199198

200-
201199
### Vertical Metrics Modifications
202200

203-
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.
201+
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.
204202

205203
#### `percent` Sub-Command Usage
206204

207-
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.
205+
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.
208206

209207
```
210208
$ font-line percent [percent change] [fontpath 1] <fontpath ...>
211209
```
212210

213-
A common default value used by typeface designers is 20% UPM. To modify a font on the path `TheFont.ttf` to 20% of the UPM metric, you would enter the following command:
211+
A common default value used by typeface designers is 20% UPM. To modify a font on the path `TheFont.ttf` to 20% of the UPM metric, you would enter the following command:
214212

215213
```
216214
$ font-line percent 20 TheFont.ttf
217215
```
218216

219217
Increase or decrease the integer value to increase or decrease your line spacing accordingly.
220218

221-
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.
219+
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.
222220

223221
You can inspect the vertical metrics in the new font file with the `report` sub-command (see Usage above).
224222

225223
#### Details of Font Metrics Changes with `percent` Sub-Command
226224

227-
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.
225+
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.
228226

229227
font-line currently supports three commonly used vertical metrics approaches.
230228

@@ -237,7 +235,7 @@ Where metrics are defined as:
237235
- [OS/2] TypoAscender = [OS/2] winAscent = [hhea] Ascent
238236
- [OS/2] TypoDescender = [OS/2] winDescent = [hhea] Descent
239237

240-
font-line calculates a delta value for the total expected height based upon the % UPM value defined on the command line. The difference between this value and the observed number of units that span the [OS/2] winAscent to winDescent values is divided by half and then added to (for increased line spacing) or subtracted from (for decreased line spacing) each of the three sets of Ascender/Descender values in the font. The [OS/2] TypoLinegap and [hhea] linegap values are not modified.
238+
font-line calculates a delta value for the total expected height based upon the % UPM value defined on the command line. The difference between this value and the observed number of units that span the [OS/2] winAscent to winDescent values is divided by half and then added to (for increased line spacing) or subtracted from (for decreased line spacing) each of the three sets of Ascender/Descender values in the font. The [OS/2] TypoLinegap and [hhea] linegap values are not modified.
241239

242240
**Vertical Metrics Approach 2**
243241

@@ -249,7 +247,7 @@ Where metrics are defined as:
249247
- [OS/2] winAscent = [hhea] Ascent
250248
- [OS/2] winDescent = [hhea] Descent
251249

252-
font-line calculates a delta value for the total expected height based upon the % UPM value defined on the command line. The difference between this value and the observed number of units that span the [OS/2] winAscent to winDescent values is divided by half and then added to (for increased line spacing) or subtracted from (for decreased line spacing) the [OS/2] winAsc/winDesc and [hhea] Asc/Desc values. The [OS/2] TypoAsc/TypoDesc values are not modified and maintain a definition of size = UPM value. The [OS/2] TypoLinegap and [hhea] linegap values are not modified.
250+
font-line calculates a delta value for the total expected height based upon the % UPM value defined on the command line. The difference between this value and the observed number of units that span the [OS/2] winAscent to winDescent values is divided by half and then added to (for increased line spacing) or subtracted from (for decreased line spacing) the [OS/2] winAsc/winDesc and [hhea] Asc/Desc values. The [OS/2] TypoAsc/TypoDesc values are not modified and maintain a definition of size = UPM value. The [OS/2] TypoLinegap and [hhea] linegap values are not modified.
253251

254252
**Vertical Metrics Approach 3**
255253

@@ -261,31 +259,28 @@ Where metrics are defined as:
261259
- [OS/2] winAscent = [hhea] Ascent
262260
- [OS/2] winDescent = [hhea] Descent
263261

264-
*Changes to the metrics values in the font are defined as*:
262+
_Changes to the metrics values in the font are defined as_:
265263

266-
- [OS/2] TypoLineGap = x% * UPM value
264+
- [OS/2] TypoLineGap = x% \* UPM value
267265
- [hhea] Ascent = [OS/2] TypoAscender + 0.5(modified TypoLineGap)
268266
- [hhea] Descent = [OS/2] TypoDescender + 0.5(modified TypoLineGap)
269267
- [OS/2] WinAscent = [OS/2] TypoAscender + 0.5(modified TypoLineGap)
270268
- [OS/2] WinDescent = [OS/2] TypoDescender + 0.5(modified TypoLineGap)
271269

272-
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.
270+
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.
273271

274272
### Important
275273

276-
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.
277-
274+
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.
278275

279276
## Issue Reporting
280277

281278
Please [submit a new issue report](https://github.com/source-foundry/font-line/issues/new) on the project repository.
282279

283-
284280
## Acknowledgments
285281

286282
font-line is built with the fantastic [fontTools](https://github.com/fonttools/fonttools) Python library.
287283

288-
289284
## License
290285

291-
MIT License. See [LICENSE.md](docs/LICENSE.md) for details.
286+
MIT License. See [LICENSE.md](docs/LICENSE.md) for details.

0 commit comments

Comments
 (0)