I'm drawing certain images in WPF which will be displayed by a game (developed by a third party). I currently produce the images using a RenderTargetBitmap
. Unfortunately it seems that this only supports the Ideal
text formatting mode, resulting in blurry small fonts. The application is a third-party game and thus there's no way around using images.
Can I tell the RenderTargetBitmap
to assume that it's drawing an image destined for one of the current montiors? Is there another way to get WPF to use the Display
rendering mode for off-screen drawing?
I understand why this might seem wrong in the theoretical sense, but in practice there are reasons why I think this is not an unreasonable thing to do:
Display
mode allows is aliased text, which looks better at small sizes than the Ideal
rendering, and is completely independent of monitor properties such as gamma.Display
-mode text rendered in ClearType looks far better on any screen, even those with different gamma, than Ideal
-mode text.Can the WPF rendering engine do this, or do I have to fall back onto GDI? (which has no difficulties with using Aliased or ClearType rendering off-screen)
There is certainly no obvious way of doing this. I guess drawing to images was never a goal of WPF; the fact that it can actually do this fairly well most of the time must be accidental.