Bug report #1752
Font label settings not working on OS X
|Affected QGIS version:||Regression?:||No|
|Operating System:||OS X||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11812|
When changing the font settings for labels in the properties dialog for a vector layer, the font selector is brought up but changes to the fonts make no effect on the label display. Looking at the qgs file, the fonts stay on their default of Lucinda Grande 12.
#3 Updated by William Kyngesburye almost 12 years ago
4.4.something. I've been holding off on 4.5 until I hear more about whether Qgis is supposed to be compatible with 4.5, or just "it should be, but...". So far I'm just hearing about issues like this one.
Are you using the standard version or the Cocoa version?
#7 Updated by William Kyngesburye almost 12 years ago
Here's a possibility: the font selection now uses the system font dialog:
On Mac, native dialogs are now used when calling show, open, or exec on a QFileDialog, QColorDialog, QPrintDialog, or QFontDialog (i.e not only when using the static functions)
Maybe it's returning the font specification in a Mac-specific form that Qgis doesn't understand?
#9 Updated by John Tull almost 12 years ago
Great work, Tom. This does get around the issue. I agree that it is probably a qt bug, which has been my hunch. I could not find anything about this on their mail lists.
The same problem exists in the map composer. I've attached the two cpp files with the necessary edits. Not sure how to create the patch file.
I was close to finding this workaround today, but gave up. I was unclear on how to call the DoNotUseNativeDialog option and gave up. Glad to see your still keeping an eye on mac-related issues. I will look into qt-64 bit, although I hit some other problems when I tried that a month or so back that I cannot recall now.
#12 Updated by William Kyngesburye over 10 years ago
- Status changed from Closed to Feedback
- Resolution deleted (
Either it wasn't really fixed, or it's back. Reported in #3105. It goes beyond vectors (maybe this originally did, but noone noticed) -- all layout and map composer font selection seems to be affected.
Now with Qgis 1.5, Qt 4.6 Cocoa, both OSX 10.5 and 10.6.
OSX 10.6 64bit: some fonts work, some fonts snap to another when selected and/or don't display the correct font. I don't see any pattern of kinds of fonts (PS, OTF, TT, Mac) or whether they are loaded directly by the system from standard font folders or from a font manager.
OSX 10.5 32bit: same behavior as this original bug - font is selected in the font dialog, but display doesn't change and font snaps back to Lucida Grande. Though it looks like Qt 4.6 Cocoa now forces the Mac font dialog, whether or not the program asks for it (ie from ).
#16 Updated by William Kyngesburye over 10 years ago
I've been meaning to poke at this, so here's some more test results. I changed the dialog code to force non-native for all Cocoa Qt, then tried some fonts.
- At any time, when a font manager is used (the pro kind that enables fonts in-place instead of copying to standard font folders), Qt ignores the DontUseNativeDialog flag and shows the native font dialog, with all its problems. Otherwise,
- Initially, the Qt font dialog is shown. Font selections don't snap back to other fonts, BUT some fonts still don't work, ie they display as Helvetica.
Once a font is selected and OK'd (back to the map display, but not back to the labeling dialog), one of two things may happen the next time the font dialog is shown:
- If the font selected previously was a working font, the Qt font dialog is shown again,
- If the font selected previously was not working (displays as Helvetica), the native Mac font dialog is shown.
#17 Updated by William Kyngesburye over 10 years ago
Looking into this some more, checking things I should have... There is a Qt bug for 4.6.3 for the problem where it sometimes ignores DontUseNativeDialog. Fixed in 4.7.1.
A couple hits for the selection issue in native dialogs.
One Qt bug seems to be similar, but it's only fixed for Qt 4.8.
Another suggests that if the initial font specified in getFont() is invalid, the dialog always returns the default font, which was the original problem of this Qgis bug report.
I guess I need to look at Qt 4.7 again, I had other issues with that but forgot to write anything down.
#19 Updated by William Kyngesburye over 10 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
Verified that the DontUseNativeDialog Qt bug is fixed in 4.7.1, so Qgis can force the Qt font dialog starting with Qt 4.7.1. e4389418 (SVN r15324) forces the Qt font dialog for Qt Cocoa. With Qt 4.5-4.6 it will try, though generally fail, to do so, but that's all it can do.
Font selection is still problematic, though it's also probably a Qt bug. But I think I now have the pattern for what fonts can't be used. Although all fonts can be selected in the Qt font dialog, some display with the default font (ie Helvetica). These include all non-roman OTF fonts, like CJK and symbol fonts. some examples:
- Hiragino family (system), Japanese
- Wingdings family (system), symbol
- any of the CJK OTF fonts bundled with Adobe software
CJK/symbol fonts that work because they're TT or PS fonts:
- Carta PS
- Osaka (system), Japanese
- other CJK TT fonts from the system
- other language fonts in the system (Cyrillic, ...)
- ESRI symbol fonts
Closing as fixed, though it's only fixed as far as it can be within QGIS (dialog only for Qt 4.7.1+, font display works within limits).