Ecere SDK/eC Forums
http://www.ecere.com/community/
Print view

IDE Font Settings
http://www.ecere.com/community/viewtopic.php?f=16&t=427
Page 1 of 1
Author:  cloutiy [ Thu Jul 21, 2016 1:51 pm ]
Post subject:  IDE Font Settings

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
Author:  jerome [ Thu Jul 21, 2016 3:27 pm ]
Post subject:  Re: IDE Font Settings

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
Author:  cloutiy [ Thu Jul 21, 2016 5:58 pm ]
Post subject:  Re: IDE Font Settings

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
Author:  jerome [ Thu Jul 21, 2016 9:17 pm ]
Post subject:  Re: IDE Font Settings

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
All times are UTC-05:00 Page 1 of 1