Paint.NET v3.5 now enhanced for Windows 7 with DirectWrite

The latest alpha build of Paint.NET v3.5 will now use DirectWrite instead of GDI for the Text tool if you are running Windows 7. Get it while it’s hot:

DirectWrite is a new font and text rendering system that comes with Windows 7. In Paint.NET, you’ll see the following benefits:

  • Faster text rendering. This is currently due to important architectural differences from GDI. With DirectWrite, I can render using multiple threads (performance scaling), while also not blocking the UI thread from drawing (mutexing). GDI can only render text on 1 thread at a time, and that also includes the thread responsible for the UI. DirectWrite can also benefit from GPU acceleration when things are set up correctly with Direct2D (Paint.NET only uses the software rasterization capabilities right now, but in the future who knows!).
  • Better quality text rendering. DirectWrite implements what is called “y-direction antialiasing”. The short story is that GDI apparently only does antialiasing on the horizontal axis. It can also position characters with sub-pixel accuracy … in other words, GDI uses integers and DirectWrite uses floating point.

When it comes to performance you can see the difference just by opening Paint.NET, switching to the Text tool, and clicking on the font list dropdown. In GDI you’ll see the font previews slowly trickle into view, and scrolling can get laggy and “stalled” (the difference is very pronounced if you have lots of fonts installed – I have over 2000 on my system). With DirectWrite it’s nearly instantaneous and also very zippy when scrolling. If you type many lines of text onto the canvas, Paint.NET will use up to 1 thread per line for rendering (capped by the number of cores your CPU has), and on a dual- or quad-core system the performance benefit can add up. Systems with more cores/threads/CPUs will see the most benefit for both scenarios (yes, HyperThreading helps).

I tested on a 3.6GHz Core i7 and a 1.6GHz Atom. On both systems, DirectWrite was a big performance improvement.

Also, you can turn off DirectWrite in Paint.NET by launching the program with the /disableDirectWrite command-line parameter. This is quite useful for comparing the two renderers. If you don’t know what a “command-line parameter” is, then don’t worry about it 🙂

Thanks go out to Dwanye Robinson (at Microsoft) for helping out.


21 thoughts on “Paint.NET v3.5 now enhanced for Windows 7 with DirectWrite

  1. KoalaBear says:

    Wow. Nice programming. All newest technologies. 🙂

    Looking forward to all multi-core improvements in 3.5. For now I’ll have to stick with my Intel Pentium 4 2.4 Ghz (6,5 years old now). But will buy new Intel Core i7 920 when Gigabyte USB3 motherboard will be out. And also will buy Windows 7, so I can also enjoy DirectWrite.

    Have a nice day.

  2. Tom says:

    y-direction antialiasing is great for those running in portrait mode. (It’s unclear whether it’ll do subpixel in the y direction, but for the Latin character set, this does not appear to matter too much).

    Just hope it’s an independent implementation, and doesn’t inherit any of WPF’s problems with antialiasing.

  3. Matt says:

    Cool. I didn’t know about direstwrite in Windows 7. That sounds really beneficial. I can’t wait to play around with 3.5 when it comes out. Sounds like a lot of work is going into it.

  4. Phyxius says:

    You’re actually *thanking* M$? What has gotten into you? /Kidding

    Seriously though, I can’t wait to get Windows 7 to try it out!

  5. GoodThings2Life says:

    Great news!!! 🙂

    While you’re in a Windows 7-optimizing mode, can you please make sure that it registers itself in the “Default Programs” list with all its supported file types?

  6. Mary Branscombe says:

    It looks great; am I right in thinking that you’re not exposing any of the typographical OpenType controls at the moment, so I can’t go in and pick form multiple alternates for a face? Publisher and Word in Office 2010 do this so weirdly you often can’t see which alternate is which without trying them and it would be nice to have a good way of doing this, but I guess that’s a bit DTP for an image and illustration app..

  7. Rick Brewster says:

    Mary — Right. Unfortunately I’m not adding any new features to the Text tool for v3.5. This release is focusing on the fundamentals: performance, stability. I am definitely working on a longer term plan though 🙂

  8. Daniel Armstrong says:

    Hey first of all I just wanted to say great work on I have been using it for quite a while and find it great for all my little needs (Mainly making little sprites for apps and games im working on)

    I’ve been using the latest alpha since it came out now and I have found a few bugs…

    I have had a few crash bugs (I have the crash logs if you want them) and the new directwrite font rendering while being high quality seems to take about 2 mins on my machine to load the fonts in the drop down box… It used to be much much faster.

    Anyway i just thought i would let you know nad give you my machine details and crash logs in case they will help you with any of the issues.

    Keep up the great work.

  9. Greg says:

    It’s about time Microsoft added vertical antialiasing to their font rendering. How about disabling hinting?

    Too bad XP doesn’t get any love.

  10. Dan says:

    Hi Rick,

    I’ve found that Daniel Armstrong is right. On my P4 Windows 7 Ultimate RC machine font loading is definitely a lot longer.

    Hopefully this is just a glitch,
    Many thanks

  11. Jason Dash says:

    Nice addition I guess, though it does seem s little slow on my Intel Atom netbook. I was wondering if yo’d had a look at the way Windows Live Movie Maker, and Wordpad & Paint render there fonts? It’s practically instantaneous with no perceivable waiting times and no lag scrolling the box selection box. Maybe it’d a be an idea to see how they do it and try to implement it? But great work anyway!

  12. Rick Brewster says:

    Dan and Daniel — Thanks. I’ve had some other reports of this as well. I’ve filed a bug. In the meantime, try setting your “Windows Font Cache Service” service to “Automatic (Delayed Start)”. Then, after the next time you restart your computer, please pay attention to whether the font list performance has improved or not.

    (If you don’t know what I mean by setting the service to “Automatic (Delayed Start)”, then don’t worry about it :))

  13. Rick Brewster says:

    Greg — Yes it’s unfortunate that Windows XP users will not get “DirectWrite love” 🙂 However, you do get one other important thing: Paint.NET, under XP, will now use GDI instead of GDI+ for text and fonts. An increase in performance, stability, and quality is also apparent there (especially stability!).

  14. Rick Brewster says:

    Jason — Two things.

    First, try installing a lot of fonts, then compare performance 🙂 I have about 2000 fonts here, and Wordpad and Paint fall right over.

    Second, I have identified a performance issue if you use the mouse wheel to scroll the font list in Paint.NET. I’ve filed a bug to try and fix it, but in the meantime try using the scrollbar instead of the mouse wheel for scrolling, and see if that helps.

  15. Mike says:

    I have the latest RC however Im thinking I will buy it now. Do you know if the version in the store is different than the latest RC? Thanks for the article.

Comments are closed.