Font rendering attributes

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by László Mohácsi
Avatar
It would be nice to be able to alter the controls font antialiasing attributes.
Can you somehow expose these fields to the clients ?

(cleartype enabled - same font looks pretty gray and weak instead in syntaxeditor
meanwhile they appear black and strong in whidbey ide. also syntaxmemo ignores
global cleartype contrast settings)

Comments (4)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We basically use the default .NET settings for drawing fonts which should be picking up your system settings. I just did a test here and it worked perfectly.

Normally I personally work with Cleartype enabled. I set the editor font to Tahoma and it looked the same (just as bold and clear) as all the other spots in Windows that use Tahoma. Then I changed my display settings to not use Cleartype and the text became pixelated (since there is no anti-aliasing with that setting) as expected. So everything looks good from our end. I'm not sure why you would be seeing any different results than that.


Actipro Software Support

Posted 13 years ago by László Mohácsi
Avatar
Ok I know this might be a bit nerd stuff
but there is utility on the net
called ClearerType (Freeware 8k).
It sets a hidden "cleartype contrast property" (0-1200)
I use setting 0 - which is the strongest.
Check it out - this component will not adapt to these settings.
I remember some value in the .NET Canvas class (don't know how you call it)
that fine adjusts the anti aliasing settings.
If only I could access that prop...
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Maybe you are referring to Graphics.TextRenderingHint. We are using whatever the default value for that property is, which I assume is TextRenderingHint.SystemDefault. If you'd like to modify it then perhaps create a class that inherits SyntaxEditor and override the OnRender method. Then change the property value there and call the base method. But like I said before, we are not altering that sort of property at all. We are using the .NET defaults, which should match the system settings.


Actipro Software Support

Posted 13 years ago by László Mohácsi
Avatar
Aha! It was Graphics.TextContrast (that is by default 4 i set it to 0).
Thanks for the method - all the letters got real sharp just as wanted.
Thanks again for paying attention to such an irrelevant detail :)
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.