From 65b1cdcb83424d07a8f7be06b595de1ca4c8a7d8 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Mon, 30 Oct 2023 18:25:37 -0400 Subject: [PATCH] more doc fixes --- docs/src/37-sources-fonts.md | 17 +++++++++++++---- docs/src/40-using-endpoints.md | 20 ++++++++++---------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/docs/src/37-sources-fonts.md b/docs/src/37-sources-fonts.md index 797d0b8c..97845cb4 100644 --- a/docs/src/37-sources-fonts.md +++ b/docs/src/37-sources-fonts.md @@ -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 diff --git a/docs/src/40-using-endpoints.md b/docs/src/40-using-endpoints.md index 201750ec..10df6794 100644 --- a/docs/src/40-using-endpoints.md +++ b/docs/src/40-using-endpoints.md @@ -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.