If you are used to ArcMap, you no doubt have noticed that there are numerous symbology styles available for you to choose from – both picture symbols and font symbols. QGIS has it’s own symbol sets to choose from but sometimes you want your own. With a bit of effort and the right software, you can move these symbols and other custom creations into QGIS. This tutorial will also help you access the other symbols available within QGIS that do not show up in the default install. (Yes! There are more!)
One of the reasons I chose this method was to bring the TrueType fonts (TTF) into QGIS in a vector format (Scalable Vector Graphic or SVG) instead of an image format so that the symbol resolution will not degrade when changing scales. The other reason is to bring the same components into QGIS to give you the same options to customize your symbols. If you make an image of your symbol with a hot pink outline, you are stuck with that unless you want to make a new image of a different symbol. If you have the font component of the symbol in QGIS, you can just change the color.
Another thing to keep in mind when reading this tutorial is that we are only exporting one symbol component at a time to the SVG format (TTF to SVG). There might be batch converters for this out there and if you find one, let us all know. I’ve not needed that yet so just went this route.
Software you will need:
- Font editor – I’m using BirdFont (saves to SVG format) and FontForge (for resaving TTFs if there is a problem in BirdFont).
- True Type Font (though you might want to try this on other formats as well) – I’m using the DDV Georgia Highway Shield Style set created by Jim Mossman found in ArcScripts on the ESRI Support page.
- ArcMap (optional) – I’m using ArcMap 10.2.
1. Download the DDV Highway Shield Style set for your state. Jim has them all on the ArcScripts site! You can view the DDV styles in ArcMap to help you decide which one you want to use. I’ll be saving the components for the I-75 shield in this example. If you need help installing them or have questions, leave me a comment below.
** The alternative is to find the TTF file in your Windows/Fonts folder, make a copy of it and paste it into a directory of your choosing to use later.**
2. In Windows Explorer, I would suggest making a new folder for your symbols depending on the way you want to group them to keep yours separate from the QGIS defaults. Do this by going to …\Program Files\QGIS Dufour\apps\qgis\svg. You will see a variety of different folders here. Just create your own.
3. Open BirdFont after installing. The free version will have a popup window telling you what licensing your creations will need to have.
4. In BirdFont, go to File > Open and select the desired TTF file. You should see all the fonts popup.
**If you have issues seeing your font show up in BirdFont, you will need something like FontForge to resave it. Some TTFs like the DDVs I was using from ArcScripts might need to be resaved. This might be due to errors or naming issues. I used FontForge to open the TTF and then went to File > Generate Fonts… to save the file out as a TrueType under file type. I ignored the messages and continued to save the font with a slightly different name. You should now be able to return to Step 4.**
5. In BirdFont, double-click on one of the fonts that you wish to export to open that symbol or glyph in a new tab and then go to Edit > Export SVG. Navigate to the new folder you created in …\Program Files\QGIS Dufour\apps\qgis\svg and save your new SVG there. I named my shield DDVGA13a_I-75.svg. Be sure to add the file extension!
6. Repeat Steps 4 and 5 until you have all the components you need.
7. Open QGIS and load the appropriate file. In my case, I just opened a point Shapefile.
8. Go to Settings > Style Manager… to bring up the Style Manager window. In the left-hand panel in the window, click on Groups and then green plus button directly below it to add a new group. I named mine DDVGA13a.
9. To bring in your SVG symbol (or any others in the folders you are about to discover), you will use the other green plus button that is under the symbol panel. Click on “simple marker“. Look for Symbol Layer Type in the widow and select SVG marker from the dropdown list. Scroll through the list of folders and select yours then click on the symbol you want to create as a new marker and click on OK. It will prompt you for a name. I named mine DDVGA I-75.
10. Now this new SVG marker can be saved to the group you created earlier. Simply right-click on the marker, select Apply Group and then select your new group’s name. This just keeps things better organized if you happen to like that kind of thing.
Sharing your QGIS symbols with others:
You’ve just made these new SVGs and it would be a shame not to share them with others. You really only need to bundle the XML and the folder containing your SVGs.
1. Open QGIS and go to Settings > Style Manager if it is not already open.
2. Click on the Share button at the bottom of the window and select Export. Select the markers you want to include in the style you will be creating. Save the XML to a directory of your choosing.
**The paths in the XML are hard coded. If you select symbols from another folder, you will need to copy the folder structure used at the time of making the XML.**
3. Open two Windows Explorer windows. In the first one, navigate to …\Program Files\QGIS Dufour\apps\qgis\svg and search for the folder(s) that contain your symbols. If you don’t remember which folder something is in, you can always search the folder using the Window Explorer search bar.
3. In the second Windows Explorer window, navigate to the location of your XML file and create a new folder that is the same name (s) as the folder(s) that contain the SVGs you want to send. Copy the SVGs from window #1 that you selected for your XML then paste them into the corresponding folder(s) in window #2. Now you should be able to send these to others for them to add to their QGIS.
Adding shared symbols to your QGIS:
1. In Windows Explorer, navigate to …\Program Files\QGIS Dufour\apps\qgis\svg and paste the folders that were given to you into that directory.
2. Open QGIS and go to Settings > Style Manager. Click on the Share button at the bottom of the window and select Import, then navigate to the XML file given to you with the SVG folders. If all goes well, you should see new symbols added to the symbol tabs.
End of Line.
Remember, if you have trouble with file paths or names, you can always open the XML in a text editor to view them there.
Have questions or something to add? Leave us a comment or contact us through email.
Update 02.01.14: If you just want to use a character marker from one of your fonts, you can do that in QGIS by following Steps 7-9 above and instead of selecting SVG marker, select Font marker. This should bring up all your installed fonts. Special thanks to Nathan Woodrow for pointing this out!