That's a long title that perfectly captures another issue I have found with GDI+ text rendering.
While checking Kris's claim on text rendering using GraphicsPath1 I have noticed that GDI+ text rendering using TextRenderingHint.AntiAlias looks much better (less fuzzy) in simple tests than the result of using HTML Renderer to generate transparent image (using AntiAlias hint). It's strange as HTML Renderer uses the same GDI+ text rendering method.
Category Archives: DevLife
GDI text rendering to image
The saga of GDI text rendering issues continues, after solving Transparent text rendering with GDI I got a complain that using HTML Renderer to rendering images (PNG, bitmap, etc.) results in pixelated text as discussed in this HTML Renderer discussion.
Transparent text rendering with GDI
After changing HTML Renderer to GDI text rendering (see previous post and this one) I have encountered another issue: GDI doesn't support alpha channel, which means that GDI is unable to render anything with transparent color. A problem as before the change HTML Renderer fully supported transparent text.
Continue reading
Using native GDI for text rendering in C#
To complete my previous post on text rendering in .NET I will present here the pitfalls I encountered migrating HTML Renderer to native GDI text rendering. The final result is ready to use NativeTextRenderer class with simple managed API that can be used for native GDI text rendering.
Continue reading
The wonders of text rendering and GDI
My research into text rendering in .NET/Windows started with HTML Renderer, I have noticed text issues in the rendered HTML: fonts were pixelated, letter were too close, words were either too close or too far apart (Figure 1). Although minor issues they were bugging me, also I was hoping it will lead to some performance improvements as from my last optimization session text draw/measure were the most time consuming operations.
The resulted improvement exceeded my wildest expectations and worth a post on.
Continue reading
Multicore JIT starting time optimization
Quick post on a great new feature in .NET 4.5: Multicore JIT.
Inspired by Rick Brewster blog post.
Continue reading
Optimizing images usage in .NET – part 2
Following my previous post, where I investigated the performance impact of loading images in .NET application, I will conclude the discussion with optimization proposals.
Continue reading
Optimizing images usage in .NET – part 1
Using image is an integral part of GUI application but I have found very little resources on it's resource consumption and how I can optimize it. The goal of this post is exactly that, in part 1 I will show the performance impact and in part 2 I will propose an optimization.
I'm going to consider only the memory usage as CPU performance is generally insignificant.
Continue reading
HTML Renderer 1.4.0.0
I'm very happy to release another update for the project, I believe I'm getting very close to remove the 'Beta' tag from it.
This update has many fixes for complex layout and tables to handle much more complex htmls, better support for style sheet loading (see below), context menu, embedded videos and finally fixing the support for preformatted text!
I have dropped support for 'Bridge' object (see below) which can be a breaking change if used, it quite easy to replace it's use with events as can be seen in the demo application. Hopefully this will be the last version that has breaking changes.
For next version (v1.5) I'm planning to rewrite the object model (CssBox monster) and core parsing engine to significantly improve performance, especially the memory allocations that can pretty bad now for large htmls. Of course I will continue to fix bugs and add support for features as requested by the community.
Continue reading
HTML Renderer 1.3.0.0
Sorry for taking so long for this version I have been busy with work.
This version is focused around image and error handling (see below) with more fixes as usual.
The next version, 5-6 weeks, will have many html layout improvements so stay tuned.
Continue reading