-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenLayers Vector Tiles need Web font instead of PBF glyphs #641
Comments
Or rather, publish the used fonts as web fonts with urls like |
Do you have any open examples of fonts in this css format I could download and look at? If someone were to work with this I think you would start with either modifying this endpoint https://github.com/maptiler/tileserver-gl/blob/master/src/serve_font.js#L41 Or, in the case of the second post, probably making a new similar endpoint. |
@acalcutt The Google Fonts API delivers fonts like this, e.g. https://fonts.googleapis.com/css?family=Noto+Sans:400italic. Or Fontsource, e.g. https://cdn.jsdelivr.net/npm/@fontsource/noto-sans/400-italic.css. |
See openlayers/ol-mapbox-style#698 (comment) for my proposal for a metadata extension to the GL Style documents. To provide fonts like that, it should be enough to expose the directory structure of the respective Let me know if there are any questions or comments. |
When using vector tiles from tileserver-gl with OpenLayers it currently falls back to downloading fonts from Google font servers. See openlayers/ol-mapbox-style#698
Fixing this would be easier if the fonts are not only defined via the glyphs (for maplibre) but also as normal Web fonts and make them available in a css ala
https://mytileservergl.com/fonts/{fontstack}/{range}.css
.Currently one either has to accept that fonts are downloaded from Google servers. Or you add every single font used in the vector tiles to your application. And every client has to repeat this work again.
The text was updated successfully, but these errors were encountered: