bugGNU Octave - Bugs: bug #37187, fix font width subpixel rendering...


bug #37187: fix font width subpixel rendering in the GUI command window

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Sat 25 Aug 2012 12:04:28 AM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 19 Apr 2014 04:04:26 PM UTC, comment #5: 

Looks good to me, compared against 3.8.1 and against gui-release (which does not have this merged yet).

Mike Miller <mtmiller>
Project Administrator
Fri 18 Apr 2014 12:42:19 PM UTC, comment #4: 

I have pushed the fix from Konsole with changeset

Torsten Lilge <ttl>
Project Member
Wed 26 Mar 2014 09:16:18 PM UTC, comment #3: 
Michael Goffioul <goffioul>
Wed 26 Mar 2014 09:11:04 PM UTC, comment #2: 

Was anything ever done about this problem?  The link to the KDE patch doesn't work now.  Does anyone know where to find that change?

I agree with ttl that we should implement the first solution now and fix the sub-pixel rendering problem later.

John W. Eaton <jwe>
Project Administrator
Sun 03 Feb 2013 12:33:07 PM UTC, comment #1: 

I suggest to implement solution 1 for now but leaving the bug open (maybe with reduced severity).

Torsten Lilge <ttl>
Project Member
Sat 25 Aug 2012 12:04:28 AM UTC, original submission:  

As discussed at length in this thread


the rendering for fixed width fonts in the GUI command window is still not correct. I can submit screenshots for reference if requested. To reproduce this, one must be using Qt on a system with a font rendering engine that has subpixel rendering (SPR) enabled. In my case, Qt is using the FreeType library with SPR enabled, which is the default for Debian and Ubuntu systems, but not Fedora or Red Hat. With SPR, a character can have a width that is a non-integer number of pixels.

A fix was made to qterminal for this problem


but this change only reduces the effect so that it is not cumulative over long strings of characters, now only one character at a time is offset by some fraction of the character width. The larger the font size, the larger the offset.

I can see two possible solutions:

1. Tell Qt to force integer metrics and ignore SPR even if available. This is the approach taken by Konsole, the project that qterminal is derived from. The patch applied to Konsole is shown here:


2. Fix qterminal to compute font and cursor widths and offsets in floating point, which has already started, so there is no round-off error.

With the first solution, this can be fixed immediately. Pursuing the second solution will take time and more investigation, require more floating point arithmetic to be done in the GUI, but will result in improved appearance on systems that support subpixel rendering.

Mike Miller <mtmiller>
Project Administrator


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-03 mtmiller Carbon-CopyRemoved 80942 => -
    2014-04-19 mtmiller StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5