back

by raphlinus·10y ago·view on hn ↗
I've been playing a bit with the various choices (there are so many!) and am leaning in the direction of C# + WPF + Windows.System.Media for the text drawing. Using something based on DirectWrite rather than GDI+ is important to me because of text rendering quality. I have basically ruled out Windows Universal because it feels a lot clunkier.

But I'm very much open to ideas from more experienced Windows devs who understand the tradeoffs better.

1 comments
WPF left a bad taste in my mouth because, as far as I can tell, it hastened the obsolescence of my brother's laptop around 2011. [1] But then, maybe WPF 4 under Windows 7 would have been better on the same hardware. Impossible to say now.

The best solution would probably be one that uses both DirectWrite and Direct2D. WPF 4 uses DirectWrite, but AFAIK, it's still on top of the older Direct3D-based milcore graphics system. But to use both DWrite and D2D, I guess you'd have to get down and dirty with C++, or at least use a lot of P/Invoke and COM interop in your C# code.

To be honest, I don't understand why GDI isn't good enough. Can you explain what you find lacking in GDI's text rendering, or point me at an existing explanation?

[1]: https://news.ycombinator.com/item?id=8444494

The main thing I'd add to http://www.basschouten.com/blog1.php/font-rendering-gdi-vers... is that DirectWrite looks very smooth on high-dpi displays while GDI+ is quite grainy.