[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initial font in the GUI terminal window and other font issues
From: |
Torsten |
Subject: |
Re: Initial font in the GUI terminal window and other font issues |
Date: |
Sat, 28 Sep 2013 17:37:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
On 25.09.2013 02:48, Michael Goffioul wrote:
>
> On Tue, Sep 24, 2013 at 6:56 PM, John Donoghue
> <address@hidden <mailto:address@hidden>>
> wrote:
>
> On 09/24/2013 02:05 PM, address@hidden
> <mailto:address@hidden> wrote:
>> -----------------------------
>>
>> Message: 4
>> Date: Tue, 24 Sep 2013 13:52:46 -0400
>> From: "John W. Eaton" <address@hidden> <mailto:address@hidden>
>> To: octave maintainers mailing list <address@hidden>
>> <mailto:address@hidden>
>> Subject: Initial font in the GUI terminal window and other font issues
>> Message-ID: <address@hidden> <mailto:address@hidden>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> I've had reports that the GUI terminal window isn't working properly
>> because of the font used. For example, the text is offset from the
>> cursor position or highlighting a text selection doesn't work properly.
>> These problems are happening because some proportional font is used
>> instead of a fixed-width font. This sometimes seems to happen even when
>> people are just starting up the GUI for the first time. How can we
>> ensure that an appropriate fixed-width font is used for the terminal?
>> Do we need to distribute a suitable default font along with Octave?
>>
>> Similarly, should we be selecting a particular set of fonts to use by
>> default for the GUI menus and other items? Of course, we should still
>> allow users to select the fonts they want to use if they have a
>> preference, or allow them to select the "default system fonts". But I
>> think it might be good for us to set our own default set of fonts so
>> that the default appearance of Octave is predictable.
>>
>> Comments?
>>
>> I'm not sure how to do this properly in Qt. Does anyone have experience
>> or expertise with selecting fonts and setting defaults in Qt?
>>
>> jwe
>
> I wonder if the issue is due to the default font "Courier New" is
> not being found?
>
> According to the QFont docs, you can specify font hints which will
> be used if the requested font isnt found.
> font.setStyleHint(QFont::TypeWriter);
>
> |
>
> http://http://harmattan-dev.nokia.com/docs/library/html/qt4/qfont.html#fontmatching
> |
>
>
>
> You may be right. Both QWinTerminalImpl and QUnixTerminalImpl define a
> default font with the QFont::TypeWriter hint, but I think this is always
> overridden by QTerminal::notice_settings. And notice_settings doesn't
> set the QFont::TypeWriter hint, so you may end up with a non-monospace font.
>
> Michael.
>
I have pushed changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/a28c3fb15ad8
that adds the missing setStyleHint.
Torsten