1

I'm using the Docker image of tileserver-gl to run my server (klokantech/tileserver-gl).

I would like to serve my own fonts like my pbf files of Font Awesome (currently here available). I can only use custom styles, but not use my own 'custom' fonts using tileserver-gl docker images afaik.

The glyphs url can NOT be changed as far as I know (which is crazy), even not using a custom style. Since the glyhs URL will always be eventually:

{
   "glyphs":"https://<your_server_url>/fonts/{fontstack}/{range}.pbf",
}

I also tried to place 'Font Awesome 5 Free Solid' directory in the fonts directory. So, I created next to the config.json file, a "fonts" directory, and then "Font Awesome 5 Free Solid" directory" and put the pbf files within this directory without any luck :(.

My question would be: Did somebody manage to host their own (custom) fonts using openmap tile server of tileserver-gl? I'm really clueless at this moment.

Thanks!

Regards, Melroy

Melroy van den Berg
  • 2,697
  • 28
  • 31
  • I can get it working using the `tileserver-gl-light `command. Without using Docker... But with docker is looks impossible to host your own custom fonts. – Melroy van den Berg Dec 26 '18 at 02:05

1 Answers1

1

Since you are saying you can get it working without Docker, it seems that the problem is only about adding fonts to the Docker container so they'd become accessible by the server running inside.

You can try adding them ad-hoc with mounting a volume for the container (like as described here https://fullstackme.co.uk/dev/bring-your-favourite-fonts-to-reports-running-in-docker) or build a custom container based on the one you like: just run the same commands to copy & install fonts in the Dockerfile. Once you make sure your fonts are within the container e.g. with fc-list, try using the command to add them to the server itself. Hope that helps!

Vladimir Salin
  • 2,951
  • 2
  • 36
  • 49