added a little more to the readme
This commit is contained in:
parent
069f89a809
commit
798ba508d6
1 changed files with 27 additions and 1 deletions
28
README.md
28
README.md
|
|
@ -1,7 +1,7 @@
|
||||||
# Font Helper for Karlos
|
# Font Helper for Karlos
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- take images containing several chars and break them down into individual images
|
- take images containing several chars and break them down into individual images (splitting)
|
||||||
- images containing several consecutive characters in 2D arrangement
|
- images containing several consecutive characters in 2D arrangement
|
||||||
- images containing several arbitrary characters in 1D arrangement
|
- images containing several arbitrary characters in 1D arrangement
|
||||||
- images containing a single character
|
- images containing a single character
|
||||||
|
|
@ -10,3 +10,29 @@
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
`cargo run -- split-and-create --index example/index.json --font-dir font --encoding BitPerPix4 font.sff`
|
`cargo run -- split-and-create --index example/index.json --font-dir font --encoding BitPerPix4 font.sff`
|
||||||
|
|
||||||
|
## Command Line Arguments
|
||||||
|
A font is specified by its glyph width, glyph height, and one or more _splitters_ (see below).
|
||||||
|
|
||||||
|
Commands are (use `<command> --help` to get more information):
|
||||||
|
- _Inspect_ (`inspect`): inspect a font, printing attributes and symbols.
|
||||||
|
- _Create_ (`create`): from a set of images containing single glyphs, create an sff font file.
|
||||||
|
- the file name of the glyph images should be its number in base 10, so the glyph for `a` is `97.png`
|
||||||
|
- _Split_ (`split`): parse a sequence of splitters and create individual images.
|
||||||
|
- _SplitAndCreate_ (`split-and-create`): apply the above two commands in sequence.
|
||||||
|
|
||||||
|
# Splitter
|
||||||
|
For an example of how to specify these splitters, refer to `example/index.json`.
|
||||||
|
|
||||||
|
The following variants exist:
|
||||||
|
- _Table_: a rectangular grid of glyphs, numbered ascending left to right and top to bottom.
|
||||||
|
- `path: String`: file path to image
|
||||||
|
- `nrows: Int`: number of rows
|
||||||
|
- `ncols: Int`: number of columns
|
||||||
|
- `start_number: Int`: first glyph number
|
||||||
|
- _Individual_: one row of glyphs, each with an individual (non-consecutive) number.
|
||||||
|
- `path: String`: file path to image
|
||||||
|
- `numbers: [Int]`: list of glyph numbers
|
||||||
|
- _Single_: a single glyph.
|
||||||
|
- `path: String`: file path to image
|
||||||
|
- `number: Int`: the glyph number
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue