mojodna / tessera

A tilelive-based tile server.
BSD 2-Clause "Simplified" License
324 stars 80 forks source link

Can't find FontSet #21

Open DenisCarriere opened 9 years ago

DenisCarriere commented 9 years ago

I'm using Mapbox Studio to create the TM2 file, however it doesn't seem to recognize the FontSet.

Another related discussion about this error can be found here, but no working solution. It seems to be resolved on the Mapnik side of things, but not Tessera.

https://github.com/mapnik/node-mapnik/issues/263

$ tessera tmstyle://./Style.tm2

Listening at http://0.0.0.0:8080/

/usr/local/lib/node_modules/tessera/server.js:47
        throw err;
              ^
Error: Failed to find font face 'Open Sans Bold' in FontSet 'fontset-0' in FontSet
mojodna commented 9 years ago

tessera intentionally doesn't register system fonts (to encourage maps to be self-contained units). You can either copy Open Sans into a fonts/ directory and add font-directory: url(fonts/); to your Map element (in CartoCSS) or you can set MAPNIK_FONT_PATH to the location of Open Sans on your system.

mojodna commented 9 years ago

(Yes, this should probably be documented somewhere ;-)

DenisCarriere commented 9 years ago

Thanks for the reply, this is very useful and I haven't tried this yet. I agree that the map packages should be self contained. Thanks again!