Atlaslog
Atlaslog / Field Notes / Styling & rendering
Field note · Styling & rendering

glyphs 404 leaves every label blank

Quick answer

Icons and polygons render but no text appears, and the network panel shows the glyph PBF ranges returning 404. The font stack name does not match the server's `fonts/` directory, and the Chinese Unicode ranges were never generated.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: Mapbox GL JS 2.15 / 3.x / MapLibre 4.x
Symptom
Checklist
  1. Filter the network panel by `pbf` and list which ranges return 404
  2. Open one glyph URL directly to confirm the file is absent
  3. Compare the `glyphs` template's font stack with the server directory name character by character
  4. Check whether the font directory contains CJK ranges such as `19968-20223`
  5. Check that every name in `text-font` exists under `fonts/`
Fix

Generate glyph PBFs that include the CJK ranges, point `glyphs` at `.../fonts/{fontstack}/{range}.pbf`, and set `text-font: ['Noto Sans SC Regular']`; on MapLibre also set `localIdeographFontFamily: "'Microsoft YaHei', 'PingFang SC', sans-serif"`.

Code
GET /fonts/Microsoft%20YaHei%20Regular/0-255.pbf   404 Not Found
GET /fonts/Microsoft%20YaHei%20Regular/256-511.pbf  404 Not Found
"glyphs": "https://example.com/fonts/{fontstack}/{range}.pbf",
"layers": [{
  "id": "label",
  "type": "symbol",
  "layout": {
    "text-field": ["get", "name"],
    "text-font": ["Microsoft YaHei Regular"]   // 必须与目录名一致
  }
}]
Watch out
All 120 field notesChinese originalRunnable examples
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Cite this page

Atlaslog (2026). glyphs 404 leaves every label blank. https://www.jingweizhi.com/en/cookbook/glyphs-404.html (accessed 2026-11-03).