Opened 8 years ago
Closed 8 years ago
#3046 closed defect (fixed)
Cannot set display font
Reported by: | cmbarton | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 7.0.5 |
Component: | wxGUI | Version: | 7.0.4 |
Keywords: | display font | Cc: | |
CPU: | Unspecified | Platform: | MacOSX |
Description
Attempting to set display font in preferences generates an error in GRASS 7.0.4 and above. This may or may not be limited to the Mac.
Traceback (most recent call last): File "/Applications/GRASS-7.1.app/Contents/MacOS/gui/wxpyt hon/gui_core/preferences.py", line 1446, in OnSetFont type = 'font') File "/Applications/GRASS-7.1.app/Contents/MacOS/gui/wxpyt hon/gui_core/preferences.py", line 1563, in __init__ style = wx.LB_SINGLE|wx.LB_SORT) File "/Applications/GRASS-7.1.app/Contents/MacOS/etc/pytho n/wx/_controls.py", line 1284, in __init__ _controls_.ListBox_swiginit(self,_controls_.new_ListBox(*arg s, **kwargs)) UnicodeDecodeError : 'ascii' codec can't decode byte 0xe5 in position 14: ordinal not in range(128)
Change History (12)
comment:2 by , 8 years ago
Final thought for now. I think that pressing the "font" button for preferences/appearance (and sometimes for preferences/display) now launches what is supposed to be a wxPython font dialog. This has long been known to be buggy in wxPython 2.x on some systems, including the Mac. At least conditionally for the Mac, the font setting still needs to be done using the simpler, custom built font selection dialog.
comment:3 by , 8 years ago
follow-up: 6 comment:5 by , 8 years ago
I just compiled GRASS trunk (7.3) and tested. There does not seem to be any change in the preferences behavior. Map Display font button opens custom font selection list and Appearance font button opens wxPython font manager (and locks up GUI). Am I testing the wrong code base?
comment:6 by , 8 years ago
Replying to cmbarton:
I just compiled GRASS trunk (7.3) and tested. There does not seem to be any change in the preferences behavior. Map Display font button opens custom font selection list and Appearance font button opens wxPython font manager (and locks up GUI). Am I testing the wrong code base?
The display font was not working, as you reported. As for the other font, I assume you have wxPython 2.8 and I think I limited the changes to wxPython 3, because I forgot it's problem in 2.8 as well, I will change it.
comment:8 by , 8 years ago
Here are 2 wxWidget tickets for the problem. One suggests a possible workaround and the other suggests it may be fixed in the next version of wxPython.
http://trac.wxwidgets.org/ticket/13908
http://trac.wxwidgets.org/ticket/16643
Michael
comment:9 by , 8 years ago
comment:12 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
More information.
I removed the ~.grass7/wx file to force GRASS to rebuild it. This does happen if save is pressed from preferences.
If I go to preferences and select either display or command console font, I get a Mac-specific dialog to select fonts. But I cannot close the dialog to save the font. I can only crash the GUI to get out of this. After that, I was able to get the standard GRASS font dialog for display font and select a standard font (Helvetica in this case). But that font is not used in the display--only the old GRASS default font. I can even see "Helvetica" in the wx file and it seems OK. But it is not recognized.
I have not been able to even get to the standard GRASS font selection for the console font. Trying to select it only gives the 3 column Mac font selector that does not work in this environment (which is why we had to build the existing font dialog).
This is a pretty serious bug for the display. I don't know exactly when it was introduced, but it is fairly recent since I've been making maps periodically this year with no problem.