#291: font settings not saved
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Keywords: | Platform: All
Cpu: All |
----------------------+-----------------------------------------------------
1. enter Preferences > Display > Set font
2. choose e.g. Arial
3. Save
4. quit and restart wxGUI
5. use e.g. scalebar - your font setting was not saved as you see
Also, I don't how to change encoding in Preferences > Display > Set font.
Anything I enter instead of the default "ISO-8859-1" is discarded next
time I enter the dialog.
#291: font settings not saved
-----------------------+----------------------------------------------------
Reporter: msieczka | Owner: martinl
Type: defect | Status: assigned
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [ticket:291 msieczka]:
> Also, I don't how to change encoding in Preferences > Display > Set
font. Anything I enter instead of the default "ISO-8859-1" is discarded
next time I enter the dialog.
The font encoding needs to be set to whatever Python uses when passing
strings to the OS. This will probably be the locale's encoding unless it
explicitly uses something else. Also, the encoding only affects FreeType
fonts; stroke fonts are essentially ASCII.
#291: font settings not saved
-----------------------+----------------------------------------------------
Reporter: msieczka | Owner: martinl
Type: defect | Status: assigned
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):
Replying to [comment:2 glynn]:
> The font encoding needs to be set to whatever Python uses when passing
strings to the OS. This will probably be the locale's encoding unless it
explicitly uses something else.
On my system encoding is pl_PL.UTF-8. Should I set the encoding in
Preferences > Display > Set font be set to that, instead of ISO-8859-1?
#291: font settings not saved
-----------------------+----------------------------------------------------
Reporter: msieczka | Owner: martinl
Type: defect | Status: assigned
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [comment:3 msieczka]:
> On my system encoding is pl_PL.UTF-8.
"pl_PL.UTF-8" is the locale; the encoding is just "UTF-8".
> Should I set the encoding in Preferences > Display > Set font be set to
that, instead of ISO-8859-1?
Probably. Try using some non-ASCII characters in e.g. d.text text="..."
and see what works.
If you have a Unicode version of wxWidgets, it's likely to use Unicode
internally (e.g. for anything you type into a text field). That will get
converted to a byte string (either by wxWidgets or by Python) by the time
that it's passed to d.text, and it will probably use the locale's encoding
to perform the conversion.
#291: font settings not saved
-----------------------+----------------------------------------------------
Reporter: msieczka | Owner: martinl
Type: defect | Status: assigned
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):
Replying to [comment:4 glynn]:
> Replying to [comment:3 msieczka]:
> > On my system encoding is pl_PL.UTF-8.
> "pl_PL.UTF-8" is the locale; the encoding is just "UTF-8".
> > Should I set the encoding in Preferences > Display > Set font be set
to that, instead of ISO-8859-1?
> Probably. Try using some non-ASCII characters in e.g. d.text text="..."
and see what works.
>
> If you have a Unicode version of wxWidgets, it's likely to use Unicode
internally (e.g. for anything you type into a text field). That will get
converted to a byte string (either by wxWidgets or by Python) by the time
that it's passed to d.text, and it will probably use the locale's encoding
to perform the conversion.
Whatever encoding I specify, e.g. ISO-8859-1 or UTF-8, Polish non-ASCII
chars are always rendered correct. I'm not sure if this is normal - when I
specify ISO-8859-1 I'd expect those chars to be rendered wrong.
As for the original bug report, it is fixed. Remaining issues:
1. The text overlay dialog is missing a show/hide checkbox.
2. If multiple labels are added, dragging them with a *right* mouse key
does some strange swapping.