octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #37187] fix font width subpixel rendering in t


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #37187] fix font width subpixel rendering in the GUI command window
Date: Sat, 25 Aug 2012 00:04:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.81 Safari/537.1

URL:
  <http://savannah.gnu.org/bugs/?37187>

                 Summary: fix font width subpixel rendering in the GUI command
window
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Fri 24 Aug 2012 08:04:28 PM EDT
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

As discussed at length in this thread

https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-July/029014.html

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

https://code.google.com/p/qterminal/source/detail?r=f91e00f96bc29f7f6395f08c828e09599f945511

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:

https://projects.kde.org/projects/kde/kde-baseapps/konsole/repository/revisions/de5ef9484a253795002d0e6accc86cc3cb1b5c71/diff

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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37187>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]