bugGNU Octave - Bugs: bug #59829, Wrong font setting after start up...

 
 

bug #59829: Wrong font setting after start up in GUI

Submitter:  Hg200 <hg200>
Submitted:  Tue 05 Jan 2021 08:03:14 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  ttl
Originator Name:  hg200 Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Jan 2021 07:19:53 PM UTC, comment #5: 

Okay, then I close the report. We can reopen it whenever the font detection at startup shows other issues.

Torsten Lilge <ttl>
Group Member
Thu 07 Jan 2021 09:47:55 PM UTC, comment #4: 

The fix in comment #2 is fine from my side. I now have "DejaVu Sans Mono 9" in the editor preferences. If i change my default font size to 11 and restart Octave after removing the ini file it also changes its size to 11.

Hg200 <hg200>
Thu 07 Jan 2021 09:25:07 PM UTC, comment #3: 

In stackoverflow they also say monospace causes problems with Qt5. The Qt behaviour is very weired. I tried a bit and it seems to work for me with following changes:

1.) Detect "monospace 9" instead of "DejaVu Sans Mono 9"

change
default_family = fixed_font.defaultFamily ();
to
default_family = fixed_font.family ();

2.) Set "monospace 9" instead of "DejaVu Sans 12". For this provide size when QFont is called

change
QFont font = QFont (default_family);
to
QFont font (family, fixed_font.pointSize());

If i put this into Octave it starts with "DejaVu Sans Mono 9" in the editor preferences. I have attached the code, but it is broken for Mac. And I don't think it's a good idea to rely on a "try and fail" code. Who guarantees that the code will work on other computers?


(file #50675)

Hg200 <hg200>
Wed 06 Jan 2021 10:00:00 PM UTC, comment #2: 

I have pushed cset http://hg.savannah.gnu.org/hgweb/octave/rev/6570a35920c4 where at least the size of the standard system font is detected. I have still not found a way to get the monospaced font that the user has configured for the system.

Torsten Lilge <ttl>
Group Member
Tue 05 Jan 2021 10:04:09 PM UTC, comment #1: 

Thanks for the report. I try to dig a little bit deeper.

Torsten Lilge <ttl>
Group Member
Tue 05 Jan 2021 08:03:14 PM UTC, original submission:  

I am on the current version of the development branch + Qt15. When I delete the .ini file and start Octave, the font size for editor and prompt is set to 12, although the system has a smaller font size set. To do some checks, I created a new Linux user (= default settings) and observe the same results when I start Octave. When I ran a bisect and narrow the problem it shows the change comes with cset 29158:f28c657c9f42. In 29155:be61ce9c3126 the behavior is  fine. Attached is a picture showing the default settings in Fedora Cinnamon and how Octave starts.

Hg200 <hg200>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #50663:  fonts_.jpg added by hg200 (185KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by hg200 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-08 ttl StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2021-01-07 hg200 Attached File- Added experimental_fonts_broken.diff, #50675
    2021-01-06 ttl StatusNone In Progress
    2021-01-05 ttl Assigned toNone ttl
    2021-01-05 hg200 Attached File- Added fonts_.jpg, #50663

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code