Skip to content

Commit d25c808

Browse files
committed
use noto glyphs as fallback
1 parent 804e4eb commit d25c808

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"p-defer": "^4.0.1",
8080
"p-mutex": "^0.1.0",
8181
"secret-stream-http": "^1.0.1",
82+
"smp-noto-glyphs": "^1.0.0-pre.0",
8283
"styled-map-package-api": "^5.0.0-pre.4",
8384
"typebox": "^1.0.61",
8485
"typed-event-target": "^3.4.0"

src/routes/maps.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { IRequestStrict, IttyRouter, type RequestHandler } from 'itty-router'
22
import Mutex from 'p-mutex'
3-
import {
4-
emptyTileFallback,
5-
emptyGlyphFallback,
6-
} from 'styled-map-package-api/fallbacks'
3+
import { notoGlyphFallback } from 'smp-noto-glyphs'
4+
import { emptyTileFallback } from 'styled-map-package-api/fallbacks'
75
import { createServer as createSmpServer } from 'styled-map-package-api/server'
86

97
import type { Context } from '../context.js'
@@ -28,7 +26,7 @@ export function MapsRouter({ base = '/' }, ctx: Context) {
2826

2927
const smpServer = createSmpServer({
3028
base: `${base}:mapId/`,
31-
fallbackGlyph: emptyGlyphFallback,
29+
fallbackGlyph: notoGlyphFallback,
3230
fallbackTile: emptyTileFallback,
3331
})
3432

0 commit comments

Comments
 (0)