Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Alex Mercer on March 31, 2019, 05:50:20 pm

Title: Why Code::Blocks does not support font anti aliasing?
Post by: Alex Mercer on March 31, 2019, 05:50:20 pm
In many sites the best font for IDEs is Inconsolata, and when it comes to Code::Blocks it does not support anti-aliasing for these type of fonts. It is the 17th version but it still doesn't support anti-aliasing. Why don't the developers of this IDE provide this facility?
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: oBFusCATed on March 31, 2019, 07:13:25 pm
What do you mean? Which OS? How many dpis have you monitor? Screenshot comparing it to another editor where AA works?
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: Alex Mercer on April 20, 2019, 06:04:14 pm
I am using windows. The first picture is from sublime and the other one is from the codeblocks. Both are set to Inconsolata font.
I have attached it for you.
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: oBFusCATed on April 20, 2019, 06:06:01 pm
The images aren't visible.
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: Alex Mercer on April 20, 2019, 06:26:36 pm
I couldn't put an image using the image tag, so i attached it. I need a little help with these image tags syntax. The images are in my desktop.
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: stahta01 on April 20, 2019, 08:54:54 pm
I would suggest using a larger font size in Code::Blocks and see if that improves the font appearance.

Tim S.
 
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: oBFusCATed on April 20, 2019, 09:03:43 pm
Does this problem happen with all fonts? Does this font work in notepad++? CodeLite?
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: eranif on April 21, 2019, 01:05:27 am
Attached are two screenshots taken from latest CodeLite. The first uses the Inconsolata  As you can see, its smooth. The second shows the support for ligatures in wxSTC.

I am not sure if you guys are doing this for CodeBlocks, but to get the smooth look + support ligature (for Windows), you will need to change wx/setup.h a little bit:

Enable wxGCDC:

Code: [Select]
#define wxUSE_GRAPHICS_CONTEXT 1

and also this is enabled:

Code: [Select]
#define wxUSE_GRAPHICS_DIRECT2D 1

Now, in all wxSTC subclasses, I have this call enabled for Windows:
Code: [Select]
wxStyledTextCtrl::SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);

Inconsolata smooth:

(https://codelite.org/tmp/smooth.png)

Fira Code (font with ligatures, IMO, the best coding font) :

(https://codelite.org/tmp/fira-code.png)

HTH,
Eran
Title: Re: Why Code::Blocks does not support font anti aliasing?
Post by: oBFusCATed on April 21, 2019, 01:42:55 am
We're not doing this yet. But I wanted to know if it is related or not.