Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text rendering with Core.Drawing #10

Open
objorke opened this issue Oct 26, 2019 · 1 comment
Open

Text rendering with Core.Drawing #10

objorke opened this issue Oct 26, 2019 · 1 comment

Comments

@objorke
Copy link
Member

objorke commented Oct 26, 2019

The fonts do not look good. Change default font?

image

@VisualMelon
Copy link

VisualMelon commented Oct 27, 2019

This appears to be resolved by setting the TextRenderingHint of the Graphics object:

g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

The default configurations becomes unhappy when you render onto a transparent or translucence background (it goes away if you add a background color).

I assume this comes with a cost, but I'd reckon this should be enabled by default in OxyPlot.Core.Drawing. It could be made configurable, but I'm not sure there would be much point adding behaviour just for it. Better would be to allow some mechanism for the user to configure the Graphics object directly (e.g. through a call-back).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants