Paint.NET v3.5.2 is on the way – Better font support for Win7/Vista

While I’ve mostly been taking a break from working on Paint.NET in the short term, I have been slowly working on the next minor bugfix release. The biggest change will be with how fonts are handled with DirectWrite, for all Windows 7 and many Vista users.

GDI and DirectWrite differ in the way they organize the available font families that are installed. For example, DirectWrite (and WPF and CSS) list the “Arial” font family, and include “Arial Narrow” and “Arial Black” in that bucket. You can choose those variants by varying the Weight, Style, and Stretch that you request. “Arial Narrow” would be selected by asking for the “Arial” family, and a Stretch value of “Condensed.”

GDI, however, lists “Arial Narrow” and “Arial Black” separately. This is the organization model that most software in Windows follows, starting with Notepad and going all the way to Word. Once you’ve chosen the font family, you use toggle buttons for Bold, Italics, Underline, and Strikeout. It’s a fairly simple model, and even more important is that it is well understood and people are comfortable with it.

Paint.NET now uses DirectWrite when it’s available, on both Windows 7 and Windows Vista. However, due to time constraints, the font family list is presented as-is, with no way to select font faces like Arial Narrow, and no way to configure the Weight, Style, and Stretch properties. In effect, Arial Narrow is unavailable, or “missing”.

The other difference is that DirectWrite does not handle bitmap fonts. This includes old staples like Courier, Terminal, and Fixedsys. These are of limited use in UI nowadays, but can be fun when doing image editing for certain stylistic reasons. Maybe you want to make a funny image with a talking robot, and using a font that looks like it came from a Commodore 64 helps out a lot here. Again, due to time constraints, this missing feature of DirectWrite is also projected directly into the feature set of Paint.NET.

So, I’m happy to say that in the upcoming Paint.NET v3.5.2 will “fix” all of this. For the technical minded, this is actually three fixes. The first is that Paint.NET will always ask GDI for the list of installed fonts, instead of DirectWrite. This ensures that the list in the toolbar includes Arial and Arial Narrow, etc. Second, the initialization code for the font renderer now has a fallback whereby if it asks for “Arial Narrow” and DirectWrite rejects it, that it will then ask DirectWrite to interpret it as a GDI font name (it uses CreateFontFromLOGFONT).

Third, if DirectWrite still refuses to accept the font name, then GDI will be used as an ultimate fallback renderer. This last change actually serves two purposes, the second one being an accidental but helpful corollary. First, it enables bitmap fonts in Paint.NET again. Second, there are many cases where DirectWrite has more strict error handling than GDI, and this has resulted in crashes for some users with some fonts. Now instead of a crash the user will either get GDI to render the font correctly, or GDI will render some generic substitution font like Arial. Neither is optimal, but both are highly preferable to a crash or error message.

A silly robot picture using bitmap fonts, with Arial Narrow highlighted in the font list

Other changes in Paint.NET v3.5.2 include a fix for a nasty memory leak, some bad text kerning when antialiasing is disabled, and some other functionality glitches that crept in.

Advertisements

9 thoughts on “Paint.NET v3.5.2 is on the way – Better font support for Win7/Vista

  1. zproxy says:

    I want stylus pressure support! 🙂

    It would be awesome if I could actually draw with paint.net with my tablet pc.

  2. Danielle says:

    I had an older version of Paint.NET, and my tablet DID work with it. Then a popup told me to upgrade, and I did, but when i opened the newer version, it wouldn’t work anymore… D:

  3. Sozo says:

    That’s because Rick removed the pressure sensitivity a few releases ago. It was causing some development headaches, I do believe. As far as I know, this is a feature he wants to add back in, but it will require a lot of work.

  4. Cristan says:

    Looking good :). I can’t really say I’ve missed Arial Narrow etc, but I DO use it from time to time, so it’s nice that it’s supported again in 3.5.2 :).

    Just a thing: would it be possible to preload the font previews after Paint.NET has started? This could be done in a thread with the lowest possible priority.

    Seeing the previews being loaded (on my work pc) or a “blink” and the previews are shown (home pc) isn’t really a problem, but it just feels smoother when the fonts have already been rendered before.

  5. Jedimace says:

    Looking good, I really like how Paint.net is going. I think some type of brush that has falloff would be awesome, though, because I use Paint.net for making terrains for my games, after all how could I not use it with the DDS support…

  6. GoodThings2Life says:

    Please, please, please register Paint.NET with Vista/W7 “Default Programs” list with its associated file types, so we can easily control which file types default to it.

    It’s great that a custom install can let me set them once, but let’s face it, too many apps hijack those settings and it’s a pain to reset them to Paint.NET later.

Comments are closed.