ReviewOS

stacks/ts-maps

Offline: download glyph ranges for non-Latin scripts

#6256
Closed chris opened this 9 days ago ·
9 days ago

Offline downloads keep the style's glyph ranges for Basic Latin, Latin-1/Extended and General Punctuation only (styleResources in offline/plan.ts). A downloaded area whose labels use other scripts — Cyrillic, Greek, Arabic, CJK — will be missing glyphs offline when the style uses a glyphs server.

Scope

  • Work out the glyph ranges actually needed: scan the names in the region's vector tiles during indexing (_buildIndex already decodes the top-zoom tiles), collect code-point blocks per font stack, and download those ranges.
  • Or offer an explicit glyphRanges option.
  • Test with a tile containing non-Latin names.

Styles that render with local fonts (the built-in styles) are unaffected.

Sign in to comment on this issue.