Skip to content

Commit

Permalink
Update README.md (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
moonbings authored Feb 16, 2022
1 parent f73206b commit 886a940
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,35 +94,35 @@ synthtiger -o results -w 4 -v examples/multiline/template.py Multiline examples/

1. Prepare corpus

`txt` format, line by line. ([example](resources/corpus/mjsynth.txt))
`txt` format, line by line ([example](resources/corpus/mjsynth.txt)).

2. Prepare fonts

See [font customization](#font-customization) for more details.

3. Edit corpus path and font path in config file
3. Edit corpus path and font path in config file ([example](examples/synthtiger/config_horizontal.yaml))

4. Run gen.py
4. Run synthtiger

### Font customization

1. Prepare fonts

`ttf`/`otf` format. ([example](resources/font))
`ttf`/`otf` format ([example](resources/font)).

2. Extract renderable charsets

```bash
python tools/extract_font_charset.py -w 4 fonts/
```

This script extracts renderable charsets for all font files. ([example](resources/font/Ubuntu-Regular.txt))
This script extracts renderable charsets for all font files ([example](resources/font/Ubuntu-Regular.txt)).

Text files are generated in the input path with the same names as the fonts.

3. Edit font path in config file
3. Edit font path in config file ([example](examples/synthtiger/config_horizontal.yaml))

4. Run gen.py
4. Run synthtiger

### Colormap customization

Expand All @@ -136,11 +136,11 @@ synthtiger -o results -w 4 -v examples/multiline/template.py Multiline examples/
python tools/create_colormap.py --max_k 3 -w 4 images/ colormap.txt
```

This script creates colormaps for all image files. ([example](resources/colormap/iiit5k_gray.txt))
This script creates colormaps for all image files ([example](resources/colormap/iiit5k_gray.txt)).

3. Edit colormap path in config file
3. Edit colormap path in config file ([example](examples/synthtiger/config_horizontal.yaml))

4. Run gen.py
4. Run synthtiger

### Template customization

Expand Down

0 comments on commit 886a940

Please sign in to comment.