Skip to content

Commit

Permalink
more doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Oct 30, 2023
1 parent 127c989 commit 65b1cdc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
17 changes: 13 additions & 4 deletions docs/src/37-sources-fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions docs/src/40-using-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 65b1cdc

Please sign in to comment.