Skip to content

Commit 827fe91

Browse files
committed
[README.md] updated documentation for the v0.2.0 release
1 parent cf869b2 commit 827fe91

File tree

1 file changed

+41
-8
lines changed

1 file changed

+41
-8
lines changed

README.md

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,27 @@
1313

1414
## About
1515

16-
`fdiff` is a Python command line comparison tool that demonstrates differences in the OpenType table data between font files. The tool provides cross-platform support on macOS, Windows, and Linux systems with a Python v3.6+ interpreter.
16+
`fdiff` is a Python command line comparison tool for differences in the OpenType table data between font files. The tool provides cross-platform support on macOS, Windows, and Linux systems with a Python v3.6+ interpreter.
1717

1818
## What it does
1919

2020
- Takes two font file path arguments for comparison
2121
- Dumps OpenType table data in the fontTools library TTX format (XML)
22-
- Compares the OpenType table data across the two files using the unified diff format supported in the Python standard library
23-
- Supports optional color coding of the diff lines in the terminal
22+
- Compares the OpenType table data across the two files using the unified diff format with 3 lines of context by default
23+
24+
## Optional Features
25+
26+
- Filter OpenType tables with the `--include` or `--exclude` options
27+
- Modify the number of context lines displayed in the diff with the `-l` or `--lines` option
28+
- View colored diffs in the terminal with the `-c` or `--color` flag
29+
30+
Run `fdiff --help` to view all available options.
2431

2532
## Installation
2633

2734
`fdiff` requires a Python 3.6+ interpreter.
2835

29-
Installation in a [Python3 virtual environment](https://docs.python.org/3/library/venv.html) is recommended as dependencies are pinned to versions that are confirmed to work with this project.
36+
Installation in a [Python3 virtual environment](https://docs.python.org/3/library/venv.html) is recommended.
3037

3138
Use any of the following installation approaches:
3239

@@ -60,14 +67,40 @@ $ pip3 install --ignore-installed -r requirements.txt -e ".[dev]"
6067
$ fdiff [OPTIONS] [PRE-FONT FILE PATH] [POST-FONT FILE PATH]
6168
```
6269

63-
By default, an uncolored unified diff is performed on the two files. To view a colored diff in your terminal, include either the `-c` or `--color` option in your command:
70+
By default, an uncolored unified diff is performed on the two files defined with the local file paths in the above command.
6471

65-
##### Color diffs
72+
#### Color diffs
73+
74+
To view a colored diff in your terminal, include either the `-c` or `--color` option in your command:
6675

6776
```
6877
$ fdiff --color [PRE-FONT FILE PATH] [POST-FONT FILE PATH]
6978
```
7079

80+
#### Filter OpenType tables
81+
82+
To include only specified tables in your diff, use the `--include` option with a comma separated list of table names:
83+
84+
```
85+
$ fdiff --include head,post [PRE-FONT FILE PATH] [POST-FONT FILE PATH]
86+
```
87+
88+
To exclude specified tables in your diff, use the `--exclude` option with a comma separated list of table names:
89+
90+
```
91+
$ fdiff --exclude glyf,OS/2 [PRE-FONT FILE PATH] [POST-FONT FILE PATH]
92+
```
93+
94+
**Do not include spaces** between the comma separated table name values!
95+
96+
#### Change Number of Context Lines
97+
98+
To change the number of lines of context above/below lines that have differences, use the `-l` or `--lines` option with an integer value for the desired number of lines. The following command reduces the contextual information to a single line above and below lines with differences:
99+
100+
```
101+
$ fdiff -l 1 [PRE-FONT FILE PATH] [POST-FONT FILE PATH]
102+
```
103+
71104
### Other Options
72105

73106
Use `fdiff -h` to view all available options.
@@ -108,11 +141,11 @@ Unit test coverage is executed with the `coverage` tool. See the Makefile `test
108141

109142
## Acknowledgments
110143

111-
`fdiff` is built with the fantastic [fontTools free software library](https://github.com/fonttools/fonttools) and performs text diffs of binary font files using the TTX OpenType table data serialization format defined by that project. The implementation of unified text file diffs is based on a (slightly) modified version of the Python `difflib` standard library source. The modifications address performance issues with large text files like those encountered with the ttx dumps of font binary data used in this project.
144+
`fdiff` is built with the fantastic [fontTools free software library](https://github.com/fonttools/fonttools) and performs text diffs of binary font files using dumps of the TTX OpenType table data serialization format as defined in the fontTools library. The implementation of unified text file diffs is based on a (slightly) modified version of the Python `difflib` standard library source. The modifications address diff performance issues with the lengthy text output from TTX dumps of font OpenType data.
112145

113146
## Licenses
114147

115-
### fdiff Project
148+
### fdiff
116149

117150
Copyright 2019 Source Foundry Authors and Contributors
118151

0 commit comments

Comments
 (0)