maptiler / tileserver-gl

Vector and raster maps with GL styles. Server side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.
https://tileserver.readthedocs.io/en/latest/
Other
2.25k stars 642 forks source link

(Some) raster tiles fail to render fonts #1399

Open leonardehrenfried opened 1 month ago

leonardehrenfried commented 1 month ago

I'm running tileserver-gl 5.0.0 in a docker container and sometimes, some tiles fail to rasterize their fonts.

Screenshot from 2024-10-01 13-39-51

This only happens to raster tiles. The vector versions are fine:

image

I also checked the vector tiles themselves and they do contain the information that we need to display the street names and badges.

I checked the logs but cannot see anything unusual, just the regular activity of tiles and fonts being downloaded. I also cannot see a pattern of which raster tiles works and which doesn't.

Has anyone ever experienced this before?

acalcutt commented 1 month ago

Can you post the style you are using? Does it look correct in vector view?

leonardehrenfried commented 1 month ago

The style is available here: https://github.com/leonardehrenfried/ansible-baseline/blob/34c64cb42293683a5de1942786ec642348bad75e/roles/tileserver/templates/streets.json

Yes, it does look correct in the vector view, which is the bottom screenshot. (Sorry if that wasn't super clear.)

acalcutt commented 1 month ago

Did this working in [v4.13.3](https://github.com/maptiler/tileserver-gl/releases/tag/v4.13.3 . or any previous version?

acalcutt commented 1 month ago

When I test this style locally it works for me. the only change I had really made was Replacing "KlokanTech Noto Sans" with a newer "Noto Sans". I am not using the docker here , but it shouldn't be different.

https://tiles.wifidb.net/styles/streets/?raster#14/50.5318/6.4409 image

acalcutt commented 1 month ago

Can you see if see the issue with the fonts I am using and style changes. I zipped them up here. https://wifidb.net/demo/issues/streets_test_style.zip

leonardehrenfried commented 1 month ago

Maddeningly the problem appears at random. Once I delete the tile cache (handled by nginx) and re-render the tiles the previously errouneous one then has the correct fonts but elsewhere I have tiles without fonts.

It appears that during download or rendering of the font something goes awry.

acalcutt commented 1 month ago

I would think if it wasn't getting a font file at all from the server it wouldn't render the image since maplibre-native is really picky about fonts and will usually just return nothing if something is missing.

Could be a rendering issue in maplibre native. If you could test v4.13.3 and see maplibre based on opengl-2 behaves differently

Could be the change to @mapbox/glyph-pbf-composite in v4.12.0, maybe try a version before that v4.11.1 and see if the issue occurs.

acalcutt commented 1 month ago

Are you regenerating your source vector tiles often?

leonardehrenfried commented 1 month ago

Once a day.

acalcutt commented 1 month ago

So maybe also a intermittent issue in your source tiles that is getting cached and fixed before you get to look at it?