-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f229108
commit 35c69c7
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Font Sources | ||
|
||
Martin can serve font assests(`otf`, `ttf`, `ttc`) for map rendering, and there is no need to supply a large number of small pre-generated font protobuf files. Martin can generate them dynamically on the fly based on your request. | ||
|
||
## API | ||
You can request font protobuf of single or combination of fonts. | ||
|
||
||API|Demo| | ||
|----|----|----| | ||
|Single|/font/{fontstack}/{start}-{end}|http://127.0.0.1:3000/font/Overpass Mono Bold/0-255| | ||
|Combination|/font/{fontstack1},{fontstack2},{fontstack_n}/{start}-{end}|http://127.0.0.1:3000/font/Overpass Mono Bold,Overpass Mono Light/0-255| | ||
|
||
## Configuring from CLI | ||
A font directory can be configured from the [CLI](run-with-cli.md) with the `--font` flag. The flag can be used multiple times to configure multiple font directories. | ||
|
||
```shell | ||
martin --font /path/to/font_dir1 --font /path/to/font_dir2 | ||
``` | ||
|
||
## Configuring from Config File | ||
|
||
A font directory can be configured from the config file with the `fonts` key. | ||
|
||
```yaml | ||
# Fonts configuration | ||
fonts: | ||
- /path/to/fonts_dir1 | ||
- /path/to/fonts_dir2 | ||
``` |