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
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.
| Type | API | Example |
|----------|------------------------------------------------|--------------------------------------------------------------|
| Single | `/font/{name}/{start}-{end}` | `/font/Overpass%20Mono%20Bold/0-255` |
| Combined | `/font/{name1},{name2},{name_n}/{start}-{end}` | `/font/Overpass%20Mono%20Bold,Overpass%20Mono%20Light/0-255` |
| | Composite Font Request with fallbacks |
|---------|--------------------------------------------------------------|
| Pattern | `/font/{name1},…,{nameN}/{start}-{end}` |
| Example | `/font/Overpass%20Mono%20Bold,Overpass%20Mono%20Light/0-255` |
### Catalog
Martin will show all available fonts at the `/catalog` endpoint.
```shell

View File

@ -2,18 +2,18 @@
Martin data is available via the HTTP `GET` endpoints:
| URL | Description |
|-----------------------------------------|-----------------------------------------------|
| URL | Description |
|-----------------------------------------|----------------------------------------------|
| `/` | Status text, that will eventually show web UI |
| `/catalog` | [List of all sources](#catalog) |
| `/{sourceID}` | [Source TileJSON](#source-tilejson) |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/catalog` | [List of all sources](#catalog) |
| `/{sourceID}` | [Source TileJSON](#source-tilejson) |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/{source1},…,{sourceN}` | [Composite Source TileJSON](#source-tilejson) |
| `/{source1},…,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) |
| `/font/{font}/{start}-{end}` | [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` |
| `/{source1},…,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) |
| `/font/{font}/{start}-{end}` | [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` |
### Duplicate Source ID
In case there is more than one source that has the same name, e.g. a PG function is available in two schemas/connections, or a table has more than one geometry columns, sources will be assigned unique IDs such as `/points`, `/points.1`, etc.