octave-maintainers
[Top][All Lists]
Advanced

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

Re: default font for GUI on Windows systems


From: Richard Crozier
Subject: Re: default font for GUI on Windows systems
Date: Sat, 30 Mar 2013 11:13:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 29/03/13 17:37, John W. Eaton wrote:
On 03/29/2013 01:16 PM, Richard Crozier wrote:

I will have a look later in the QtOctave sources to see how it was done.
I will report this, and if you're prepared to wait for some time I will
eventually produce a changeset, but I'm up to my eyeballs with other
stuff at the min unfortunately.

OK. If you can just point to what needs to be done it would help and maybe I can do it. A changeset would just be a huge bonus.

jwe


Ok, adding an application font is as simple as adding something like the following somewhere in the appropriate place:

// Add the Inconsolata font for the editor
QFontDatabase::addApplicationFont (QDir::home().path() + QDir::separator() + "fonts/Inconsolata.otf");


In QtOctave this was done in main.cpp, when the application was loading. Once added it can be used like any other font. In QtOctave the fonts were placed in a fonts subdirectory, but you can put them anywhere you like as long as you can tell the application where that is at runtime.

Not so sure about fall backs,still looking for that.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



reply via email to

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