File tree Expand file tree Collapse file tree 2 files changed +23
-12
lines changed
Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 22
33The package provides a converter for Web Open Font Format.
44
5- ## Usage
5+ ## Installation
66
77``` shell
88cargo 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
Original file line number Diff line number Diff 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() -> ! {
6161Either the source or destination should end with either .woff or .woff2.
6262
6363Options 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
6767Options 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}
You can’t perform that action at this time.
0 commit comments