IDE Font Settings

Development forum for the Ecere IDE.
Post Reply
cloutiy
Posts: 13
Joined: Wed Jul 20, 2016 5:07 pm

IDE Font Settings

Post by cloutiy »

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
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: IDE Font Settings

Post by jerome »

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
cloutiy
Posts: 13
Joined: Wed Jul 20, 2016 5:07 pm

Re: IDE Font Settings

Post by cloutiy »

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
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: IDE Font Settings

Post by jerome »

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
Post Reply