I would like to include a custom map from openstreetmap in a booklet. I have exported the map to svg with osmarender, i.e.
xmlstarlet tr svn-archive/applications/rendering/osmarender/xslt/osmarender.xsl svn-archive/applications/rendering/osmarender/stylesheets/osm-map-features-z17.xml > map.svg
The svg looks fine when opened in a browser, or in Inkscape. Link to the svg file: map_bis_cropped.svg - sDrive
However, when included in typst with
#align(center)[
#image(
"map.svg",
width: 100%
)
]
Everything is black except the roads, and the text is way too big.
One partial solution is to rewrite the svg with rsvg-convert, i.e.
rsvg-convert -f svg -o map_final.svg map.svg
then map_final.svg is correctly rendered with typst (at least, the output in the PDF looks similar to the rendered image in the browser), but unfortunately rsvg-convert somehow does not recognize the text of the road name and they get stripped.
So my question is: is it a bug in typst svg reader? Or some features used by osmarender that are not supported by typst?
And is there a solution?
I would like to keep the map as vector graphics, as it looks much better.