Bug report #5692
Can not change legend fonts in print composer
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||OS X||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15224|
After adding a vector legend in print composer, I am not able to change the font for Title, Group, Layer, or Item. Any specified font size is changed to 14 and it does not change the font type from the default. In print composer, I am able to change fonts for labels, scale bars and attribute tables. Legend fonts can be changed in 1.7.4, therefore this is a regression.
Besides the current master, this occurs in an early March 1.9 build from KyngChaos. It does not occur in January build 1.9.90-Alpha 8ccaef7 from KyngChaos.
#5 Updated by Larry Shaffer over 7 years ago
Turned out the culprit was the Qt non-Mac-native font selection dialog.
When a font in a Qt stylesheet is applied at the QGIS app level, any non-native Qt font selection dialog (on Mac at least, maybe other platforms) that uses the app, or one of its children, as a parent will refuse to select any font but the one defined in the stylesheet.
The composer legend item, while showing correct fonts on composer opening, could not have its fonts adjusted; or worse, the legend was unexpectedly changed when a new font was selected, but substituted with the app font by the dialog.
Corrected across the app (for Mac) in commit d8c7c15