You will need to install a combo of ubuntu font, a suitable Sans-Serif font (OpenSans family font is available via GitHub) + Inkscape in addition to mirroring locally the current GitHub OSM files. Then use Inkscape to import one of the SVG files, Save-As a PDF from it, and print from that. Rinse/repeat with the other SVG file:–
Updated PDFs + SVGs (identified by ‘r15371’) are currently available at https://github.com/alexkemp9/openstreetmap-promotional-leaflets. In addition I’ve made a pull-request (a request within Github for the original author to consider pulling-in my changes), so they may soon be available from the original source (next line).
- OSM Promo Leaflet download:– github.com/gravitystorm/openstreetmap-promotional-leaflets
- ubuntu font download:– ubuntu-font-family-0.83.zip
- OpenSans font download:– github.com/onitake/fonts-open-sans
- Inkscape download:– Inkscape current release
Rewritten :: 2019-01-10
Andy Allan took the trouble to provide on GitHub (almost) all necessary components to print some funky little OSM flyers (information leaflets to present to folks on the street who, whilst you are mapping, say “What do you think you are doing?”) - see above, or at OSM Promotional Leaflets. Andy even offered to post some leaflets to me, and in the end I distributed ~4,000 of them across a period of 14 months. I call that outstanding practical assistance by Andy, and some excellent promotion for OSM.
As I get ready to do some more mapping in 2019 I need some more leaflets as there are just a handful left. I approached John E Wright printers on Huntingdon Street, Nottingham armed with the GitHub url + filename, but their Mac did not have any of the necessary fonts mentioned within osmflyer1.svg nor osmflyer2.svg, and display black rectangles instead. Worse, at home I discover those SVG files do not display correctly within any browser, nor GIMP, showing horrible black rectangles wherever text should be within the leaflet.
The OSM promo SVGs are each dated May 17, 2014 (although github saved them to my HDD as June 8, 2016) and have been created under Inkscape v0.48.3.1 r9886 (the current Debian/Devuan version is v0.92.1 r15371). Inkscape adopted the draft SVG1.2 at some point on or before v0.48.3.1, which is why the Validator gives numerous errors like this on the promo SVGs:
“SVG element flowRoot not allowed as child of SVG element g in this context”
…and why rsvg utilities such as rsvg-convert + browsers show large black rectangles when SVG1.2 features are included (see also this example of a flowroot bug). What seems particularly egregious is that when exported as a so-called “standard” SVG Inkscape still retains the deprecated v1.2 features. Ah well.
The current W3C Recommendation version of SVG is v1.1. A working draft for v1.2 was begun on 15 November 2002 and abandoned after 8 releases on 13 April 2005. The current working draft version is SVG2, which means that v1.2 is now deprecated (see also this WikiMedia bug report). That is a particular issue because all browsers (including the W3C Validator) only recognise SVG1.1 features.
All SVG files in the GitHub collection are dependent upon Inkscape and, in particular, contain flowed text. Current SVG clients & browsers are version 1.1 and do not recognise flowed text. Flowed text — text which wraps within a defined area — was introduced within the (now deprecated) SVG version 1.2, and Inkscape makes extensive use of v1.2 methods. In practical terms that means, by themselves, that the osm SVG files are useless; they require Inkscape.
This is how-to convert the osm SVGs from non-std SVG1.2 to std SVG1.1:
With the SVG loaded into Inkscape:–
- Press f8 (or click on the Text-button in the Mode column at LHS)
- Click on a section of text that is being flowed (and thus non-compliant)
- Whilst that text is selected, choose
menu:Text | Convert to text
(see also Inkscape | Frequently Asked Questions | Flowed text doesn’t show up in exported file)
Please be warned that all word edits need to be made before unflowing the text, and also that the process is very buggy, particularly in our case where emboldened text is embedded within a line. Fortunately there is a simple way of side-stepping all these bugs (either follow below steps, or edit from the ‘r15371’ SVGs as detailed at top):–
- Install Inkscape
osmflyer1.svgand update to
(the original SVG was produced under Inkscape v0.48.3.1, and the latest is v0.92.1; SVG standards shifted from 90dpi to 96dpi between the two versions (thanks to scruss for the link) and you will need to choose one of the two methods to update; I chose Auto, although this seems to have introduced an extra 2mm to all 4 leaflet dimensions)
- Export (using ‘Save As’)
osmflyer1-modified.pdffrom inside Inkscape
The following fonts are embedded within the PDF:–
- Ubuntu Bold
- Ubuntu Italic
I never added DejaView via Inkscape so it must be an alias replacement for sans-serif (see below).
Final Bits & Bobs
The SVGs contain Frobisher fonts (a proprietary font). Those fonts are not used within the PDFs.
Sans font has gone from the original SVGs and has been replaced by font-family:sans-serif at
rect3922. My Devuan system has then replaced sans-serif with DejaViewSans via the
font alias mechanism.
So, display is still buggy for SVGs produced under Inkscape, but the program should be capable of producing PDFs effective for a printer. We shall see if that is true in the New Year.
I’ve used many DTP editors before but Inkscape is a bit opaque, made worse by the fact that after exporting to a PDF the filetype was switched from SVG to PDF (which should be read-only) (doh!).
Andy has asked me to do a pull request on the GitHub package (11 Jan: now completed), adding links for the fonts used for text in the SVG (it would have been wonderful if the graphics could have been vectors rather than PNG files, but I guess that that is currently asking too much). I will certainly do that, and will also add the PDFs to make it even easier for future users once I have found someone to print them so that I can confirm that they are fine (the University printer has given me a price that is twice what Andy paid!).
These are the fonts:–
Bitstream Vera Sans font
This seems to be used only in specialised circumstances (it is not used in a default EN leaflet).
Some translated text is in the Bitstream Vera Sans font, which is provided via gnome. The link above gives a link to a FTP site with multiple downloads available for version-1.10 of the font-family. askubuntu gives concise help for installation under ubuntu/debian/devuan (for me under Devuan the fonts were placed within
Title + sub-title text is in the ubuntu font, which is the signature font for the ubuntu distribution. The link above gives a ZIP download for version-0.83 of the font-family. askubuntu gives concise help for installation under Ubuntu/Debian/Devuan (for me under Devuan the fonts were placed within
/usr/share/fonts/truetype/ubuntu-0.83, though many other locations are available & legit to use;
$ sudo fc-cache -fv will then re-cache all the fonts; re-start any apps using fonts).
OpenSans family font is available via GitHub
Final, final words
The printer said that he prefers PDF files, preferably in
X1A (2001) format, and this is a good example of why that is his preferred file-format.
The original printer still has not provided a quote, but 3 other printers have responded with quotes up to twice what Andy said his London-based printer charged. Yikes. Two printers have independently said that they want a PDF with a 3mm bleed for this kind of job, and that is what the newly-uploaded PDFs have. They also contain all embedded fonts, so should be print-ready.