klokantech / klokantech-gl-fonts

Merged Google Noto fonts to provide glyphs for unicode OpenStreetMap labels in TileServer-GL
53 stars 12 forks source link

How to incorporate into Tileserver GL #5

Open renefournier opened 7 years ago

renefournier commented 7 years ago

I notice that the latest version of Tileserver GL does not display Chinese, Japanese or Korean place names in their native language. I'm assuming that klokantech-gl-fonts are meant to address that problem. Can someone point me towards the documentation regarding how to incorporate them into Tileserver GL? Thanks.

mcm-jyl commented 6 years ago

Easy to do when you've found the command! While looking for a solution, I came to your question!

  1. Generate the _output directory with generate.js
  2. Update the config file of your server to point to this directory, for instance "fonts": "/usr/lib/node_modules/klokantech-noto-sans/_output",
  3. Restart your server
  4. Last and most important, enjoy this nice stuff!

Now you should see lines like GET /fonts/Noto%20Sans%20Regular/0-255.pbf 200

For used fonts not in this directory you'll still see lines like ERROR: Font not found: Arial Unicode MS Regular ERROR: Trying to use Noto Sans Regular as a fallback

N. B.: I was speaking about klokantech-noto-sans, here the output directory is already generated, even easier then: see https://github.com/klokantech/tileserver-gl/issues/247.

@klokan, Great work, with a few missing lines in the documentation.

mcm-jyl commented 6 years ago

Even easier: extract https://github.com/openmaptiles/fonts/releases/download/v2.0/v2.0.zip to the directory mentioned earlier as "fonts".