QGIS currently does not have a way to set a default font to be used for labelling, and being lazy I'm getting tired of having to set our house font styling for every layer I create or use (see change default font of labels in QGIS for someone else equally frustrated, and the bug report for it).
I've looked at the QGIS code changes required and it's not easy, so now I'm trying for an interim fix by writing a plugin that will either apply a default qml style file or directly set it via the api.
A couple of approaches I'm contemplating are:
- A legend context menu entry (easy to do, expandable to choosing from a list of house styles, but still a manual process)
- Catching the layerAdded signal, checking if the new layer has a style already set, and if not setting the font (more complex but fully automatic)
Before I do this, can anyone suggest a simpler hack, or something obvious I'm missing? Something using project templates, default styles, layer definition files, or something similar?
(I'm aware this won't work when using rule-based labeling, but for most use cases it will make life easier).