more doc fixes

This commit is contained in:
Yuri Astrakhan 2023-10-30 18:25:37 -04:00
parent 127c989f37
commit 65b1cdcb83
2 changed files with 23 additions and 14 deletions

View File

@ -6,13 +6,22 @@ The glyph range generation is not yet cached, and may require external reverse p
## API ## API
Fonts ranges are available either for a single font, or a combination of multiple fonts. The font names are case-sensitive and should match the font name in the font file as published in the catalog. Make sure to URL-escape font names as they usually contain spaces. Fonts ranges are available either for a single font, or a combination of multiple fonts. The font names are case-sensitive and should match the font name in the font file as published in the catalog. Make sure to URL-escape font names as they usually contain spaces.
| | Font Request |
|---------|--------------------------------------|
| Pattern | `/font/{name}/{start}-{end}` |
| Example | `/font/Overpass%20Mono%20Bold/0-255` |
### Composite Font Request
When combining multiple fonts, the glyph range will contain glyphs from the first listed font if available, and fallback to the next font if the glyph is not available in the first font, etc. The glyph range will be empty if none of the fonts contain the glyph. When combining multiple fonts, the glyph range will contain glyphs from the first listed font if available, and fallback to the next font if the glyph is not available in the first font, etc. The glyph range will be empty if none of the fonts contain the glyph.
| Type | API | Example | | | Composite Font Request with fallbacks |
|----------|------------------------------------------------|--------------------------------------------------------------| |---------|--------------------------------------------------------------|
| Single | `/font/{name}/{start}-{end}` | `/font/Overpass%20Mono%20Bold/0-255` | | Pattern | `/font/{name1},…,{nameN}/{start}-{end}` |
| Combined | `/font/{name1},{name2},{name_n}/{start}-{end}` | `/font/Overpass%20Mono%20Bold,Overpass%20Mono%20Light/0-255` | | Example | `/font/Overpass%20Mono%20Bold,Overpass%20Mono%20Light/0-255` |
### Catalog
Martin will show all available fonts at the `/catalog` endpoint. Martin will show all available fonts at the `/catalog` endpoint.
```shell ```shell

View File

@ -3,7 +3,7 @@
Martin data is available via the HTTP `GET` endpoints: Martin data is available via the HTTP `GET` endpoints:
| URL | Description | | URL | Description |
|-----------------------------------------|-----------------------------------------------| |-----------------------------------------|----------------------------------------------|
| `/` | Status text, that will eventually show web UI | | `/` | Status text, that will eventually show web UI |
| `/catalog` | [List of all sources](#catalog) | | `/catalog` | [List of all sources](#catalog) |
| `/{sourceID}` | [Source TileJSON](#source-tilejson) | | `/{sourceID}` | [Source TileJSON](#source-tilejson) |
@ -11,8 +11,8 @@ Martin data is available via the HTTP `GET` endpoints:
| `/{source1},…,{sourceN}` | [Composite Source TileJSON](#source-tilejson) | | `/{source1},…,{sourceN}` | [Composite Source TileJSON](#source-tilejson) |
| `/{source1},…,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) | | `/{source1},…,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) | | `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) |
| `/font/{font}/{start}-{end}` | [Font source](#37-sources-fonts.md) | | `/font/{font}/{start}-{end}` | [Font source](37-sources-fonts.md) |
| `/font/{font1},…,{fontN}/{start}-{end}` | [Composite Font source](#37-sources-fonts.md) | | `/font/{font1},…,{fontN}/{start}-{end}` | [Composite Font source](37-sources-fonts.md) |
| `/health` | Martin server health check: returns 200 `OK` | | `/health` | Martin server health check: returns 200 `OK` |
### Duplicate Source ID ### Duplicate Source ID