-
Notifications
You must be signed in to change notification settings - Fork 105
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
Improve blurred output #50
Comments
Alright, it wasn't completely fixed. See comment from @torfranz:
|
That's not a font issue, it's more of WPF aliasing / layout rendering / pixel pinning issue. You can't just "fix" it by changing a font. Also, for the record, the right one looks more blurry to me (check the radical sign: its' top part definitely has more pixels in height than it should; the top pixel line is shadowed). |
Have you tried overriding the OnRender method of the formula control and changing the VisualTextRenderingMode of the base to TextRenderingMode.Cleartype or GrayScale. It gets sharper but sometimes (when scaled), it adds excess pixels. |
You could make the following changes in the "WpfMath/Rendering/WpfElementRenderer.cs" file. public void RenderGlyphRun(Func<double, GlyphRun> scaledGlyphFactory, double x, double y, Brush foreground)
{
var glyphRun = scaledGlyphFactory(_scale);
Pen glyphPen = new Pen(foreground, 1);
_drawingContext.DrawGeometry(foreground, glyphPen, glyphRun.BuildGeometry());
//_drawingContext.DrawGlyphRun(foreground, glyphRun);
} It has the tendency of being too bold so you'll have to make a lot of small changes to it(the Pen). |
Hi,
Currently formulas are rendered pretty blurred.
Toying with the v0.3 version now it seems I'm unable to influence the rendering of the formula with any of the usual options, RenderOptions, TextOptions, UseLayoutRounding. I tried basically all combinations but to no avail. Can you give any hint on how to reduce the blur?
Btw, thx for the lightning speed in releasing v0.3 👍
The text was updated successfully, but these errors were encountered: