Closed vzkharov closed 23 hours ago
In the protocol-buffers package, I encountered the deprecated new Buffer
usage, and I wasn't getting any errors after modifying it. The package @mapbox/glyph-pbf-composite uses an old version of protocol-buffers that still relies on new Buffer
.
('if (!buf) buf = Buffer.alloc(encodingLength(obj))')
@prashis So does that cause the mentioned issue? seems strange it would work in oneplace and not the other. It looks like to fix it we would likely have to fork @mapbox/glyph-pbf-composite or move the functions into tileserver-gl, since that package doesn't seem maintained anymore.
Just a note for the original post, as of 4.8.0, Ubuntu 22.04 is required for linux. without that maplibre-native will be missing dependencies and crash when used. (unless you are using docker)
Try this (same api): https://github.com/jessekrubin/pbfont ?
I have not used tileserver-gl, but a tileserver-gl user found my lib and sent me this issue.
@acalcutt I've tried using https://github.com/jessekrubin/pbfont instead of @mapbox/glyph-pbf-composite
& this issue was resolved. Could we use @jsse/pbfont
?
(I was using a docker container for debugging)
Its seems like a good alternative that is more up to date. The license for it is MIT so it is compatible. I wouldn't mind a PR for that change.
FWIW it works well on front end and backend. I am compositing glyphs both places.
PS: if you're into map tiles you might like some of the tools I have made. 🔌
I suspect this may be related to: https://github.com/maptiler/tileserver-gl/issues/1295
Can anyone confirm v4.12.0 fixes this.
I can confirm that with Node 20.15.0, and v4.12.0 the new @jsse/pbfont is functioning as expected, and there are no longer any issues. Thank you all very much!
Anytime Steve! It definitely beats having to composite the fonts by hand w superglue.
Locally all works great, even
Roboto
fonts are got.Local Machine:
But on Hetzner Server when fonts are requested —
400 Bad Request
Production Setup:
(setup)
Any ideas how to fix this?