utf-8: added README section
This commit is contained in:
parent
d8262b278a
commit
fdc37548f5
37
README.md
37
README.md
|
@ -108,4 +108,39 @@ fn main() {
|
|||
|
||||
Generates this SVG:
|
||||
|
||||
[![Output](src/test_annex_i_micro_qr_as_svg.svg)](src/test_annex_i_micro_qr_as_svg.svg)
|
||||
[![Output](src/test_annex_i_micro_qr_as_svg.svg)](src/test_annex_i_micro_qr_as_svg.svg)
|
||||
|
||||
## Unicode string generation
|
||||
|
||||
```rust
|
||||
use qrcode::QrCode;
|
||||
|
||||
fn main() {
|
||||
let code = QrCode::new("mow mow").unwrap();
|
||||
let image = code.render::<u8>()
|
||||
.dark_color(0)
|
||||
.light_color(1)
|
||||
.build();
|
||||
println!("{}", image);
|
||||
}
|
||||
```
|
||||
|
||||
Generates this output:
|
||||
|
||||
```
|
||||
█████████████████████████████
|
||||
█████████████████████████████
|
||||
████ ▄▄▄▄▄ █ ▀▀▀▄█ ▄▄▄▄▄ ████
|
||||
████ █ █ █▀ ▀ ▀█ █ █ ████
|
||||
████ █▄▄▄█ ██▄ ▀█ █▄▄▄█ ████
|
||||
████▄▄▄▄▄▄▄█ ▀▄▀ █▄▄▄▄▄▄▄████
|
||||
████▄▀ ▄▀ ▄ █▄█ ▀ ▀█ █▄ ████
|
||||
████▄██▄▄▀▄▄▀█▄ ██▀▀█▀▄▄▄████
|
||||
█████▄▄▄█▄▄█ ▀▀▄█▀▀▀▄█▄▄████
|
||||
████ ▄▄▄▄▄ █ ▄▄██▄ ▄ ▀▀████
|
||||
████ █ █ █▀▄▄▀▄▄ ▄▄▄▄ ▄████
|
||||
████ █▄▄▄█ █▄ █▄▀▄▀██▄█▀████
|
||||
████▄▄▄▄▄▄▄█▄████▄█▄██▄██████
|
||||
█████████████████████████████
|
||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
||||
```
|
Loading…
Reference in a new issue