Skip to content

Commit fdd4a80

Browse files
committed
Update the usage description
1 parent cb07ec1 commit fdd4a80

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,27 @@
22

33
The package provides a converter for Web Open Font Format.
44

5-
## Usage
5+
## Installation
66

77
```shell
88
cargo install --features binary woff
9+
```
10+
11+
## Usage
12+
13+
```
14+
Usage: woff <source> <destination> [options]
15+
16+
Either the source or destination should end with either .woff or .woff2.
917
10-
woff Roboto-Regular.ttf Roboto-Regular.woff
11-
woff Roboto-Regular.woff Roboto-Regular.ttf
18+
Options for WOFF:
19+
--major-version <number> — set the major version (1 by default)
20+
--minor-version <number> — set the minor version (0 by default)
1221
13-
woff Roboto-Regular.ttf Roboto-Regular.woff2
14-
woff Roboto-Regular.woff2 Roboto-Regular.ttf
22+
Options for WOFF2:
23+
--quality <number> — set the compression quality (8 by default)
24+
--metadata <string> — append metadata (empty by default)
25+
--no-transform — disallow transforms
1526
```
1627

1728
## Contribution

src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ fn main() {
2525
(_, Some("woff")) => {
2626
data = woff::version1::compress(
2727
&data,
28-
options.get::<usize>("major").unwrap_or(1),
29-
options.get::<usize>("minor").unwrap_or(0),
28+
options.get::<usize>("major-version").unwrap_or(1),
29+
options.get::<usize>("minor-version").unwrap_or(0),
3030
)
3131
.expect("failed to compress");
3232
}
@@ -61,13 +61,13 @@ fn usage() -> ! {
6161
Either the source or destination should end with either .woff or .woff2.
6262
6363
Options for WOFF:
64-
--major <number>
65-
--minor <number>
64+
--major-version <number> — set the major version (1 by default)
65+
--minor-version <number> — set the minor version (0 by default)
6666
6767
Options for WOFF2:
68-
--quality <number>
69-
--metadata <string>
70-
--no-transform"#
68+
--quality <number> — set the compression quality (8 by default)
69+
--metadata <string> — append metadata (empty by default)
70+
--no-transform — disallow transforms"#
7171
);
7272
std::process::exit(1);
7373
}

0 commit comments

Comments
 (0)