Ecere SDK/eC Forums • View topic - IDE Font Settings




Ecere SDK/eC Forums

Ecere Developers Community

IDE Font Settings

Development forum for the Ecere IDE.

IDE Font Settings

Postby cloutiy » Thu Jul 21, 2016 1:51 pm

Hello,

I'm finding that the default font size for the IDE (both application and code editor) are rather small.

Is there a way to increase the font size through the IDE itself?

If not is there a configuration file that I can modify?

On the subject of fonts, is it possible for me to change the font used in the application and code editor?

Regards,

yves
cloutiy
 
Posts: 18
Joined: Wed Jul 20, 2016 5:07 pm

Re: IDE Font Settings

Postby jerome » Thu Jul 21, 2016 3:27 pm

Hi Yves,

The IDE has been missing this configuration for a long time!
It was the topic of a previous meet-up to put together a font selection dialog for the IDE.
The task was not finished or integrated yet, but here is what we have put together so far:

https://gist.github.com/jerstlouis/4043 ... 521407179d

We will be integrating this in a future release as soon as it is completed and integrated with the IDE settings.

In the meantime, changing the IDE fonts require re-compiling the IDE.

You should easily find the settings in ecere-sdk/ide/src/designer/CodeEditor.ec.

It does require doing a make / make install again.

It is definitely possible to change the fonts of the application. The Window class has a 'font' member which you can assign to a new FontResource instance, e.g.:

Code: Select all
class MyWindow : Window
{
   font = { "Arial", 20, bold = true };
};


It is also possible to set up multiple FontResource instance for use within a window and switching between them in the middle of drawing the window's contents like so:

Code: Select all
import "ecere"
 
class FontsForm : Window
{
   hasClose = true;
   clientSize = { 400, 200 };
   FontResource fntArial { "Arial", 20, true, window = this };
   FontResource fntTimes { "Times New Roman", 20, window = this };
 
   void OnRedraw(Surface surface)
   {
      surface.font = fntArial.font;
      surface.WriteTextf(10, 10, "Arial");
      surface.font = fntTimes.font;
      surface.WriteTextf(10, 80, "Times New Roman");
   }
}
 
FontsForm form {};



-Jerome
jerome
Site Admin
 
Posts: 614
Joined: Sat Jan 16, 2010 11:16 pm

Re: IDE Font Settings

Postby cloutiy » Thu Jul 21, 2016 5:58 pm

mmmm...thanks Jerome.

But this may be too complicated for me.

I was running into problems installing from source (error on ffi.h) and installed using:

Code: Select all
yaourt -S ecere-sdk-git


which did everything for me.

Maybe I'll wait ;S
cloutiy
 
Posts: 18
Joined: Wed Jul 20, 2016 5:07 pm

Re: IDE Font Settings

Postby jerome » Thu Jul 21, 2016 9:17 pm

Well I can help you build from source and tweak the font at the meet-up next week if you're dropping by.

For the ffi.h error, you just need to either use that PKGCONFIG line to locate the ffi headers, or do a symlink to it in the standard include path.

We're really looking forward to have this editor font option dialog but it might not make it into this week's release. Definitely the next one though.

-Jerome
jerome
Site Admin
 
Posts: 614
Joined: Sat Jan 16, 2010 11:16 pm


Return to IDE

Who is online

Users browsing this forum: No registered users and 1 guest

cron