Font rendering differences between 2.0.40 and 3.0.6

Hi everybody!

For supporting VST3 in our next release I have just built our software with a newer version of JUCE and everything works fine, just the font rendering output has changed.

We were happy with the font rendering in version 2.0.40 all the time, so I was really surprised to find so many old posts in here about the supposedly bad text rendering. But now with the new version we aren't happy anymore. Some letters are drawn to fat and the whole text does not appear to be as well-balanced as it was before. I append some examples.

We don't want to release the software like this, so we would like to revert the changes which were made in the font rendering because the alternative would be to try to get vst3 running in 2.0.40 and this would be a very hard job, I guess.

How can I replace the new font rendering with the old one?



First of all, youy should probably state which platform you are checking ?


If it's on Windows, try with and without JUCE_USE_DIRECTWRITE defined


(FYI, this has nothing to do with DirectWrite)

If you want to see what's going on, search for "applyVerticalHintingTransform". The only thing that's changed is that for smaller sizes, it now does a bit of automatic hinting, and everyone else universally thought this was a huge improvement! But you could easily disable it by just removing the call to that method.

Thank you for the hint. I removed the call to "applyVerticalHintingTransform" but I am sorry to say that there was no visible difference. I have rebuilt the whole project and the debugger goes into the "getEdgeTableForGlyph" method which is the only location where "applyVerticalHintingTransform" was called before, so I am sure to have modified the right file. Is it possible that there was another change between 2.0.40 and 3.0.6, e.g. in the EdgeTable class, which could lead to the font rendering differences.

Oh, I think there was also a bit of a change to the gamma curve to make bright colours look better. Again, it was universally welcomed by everyone else!

Hello Jules,

where should I search for the gamma curve?

Today I exchanged the whole modules/juce_graphics/fonts folder in our 3.0.6 project with the one of the JUCE version 2.0.40. There was no change visible in the text output.  Would it be possible that there are differences anywhere else which could affect the look of the fonts? When my colleagues watched the example PNG above they mentioned that it looks like an aliasing issue.

There was no change visible in the text output.

This was on Windows, right? There would be no difference on OSX.

The gamma is done as part of a general path-filling operation, in SavedStateBase::fillEdgeTable - it differs based on the colour, so is only noticeable in white-on-black text.

Great, the gamma thing worked! I have disabled the following code from the rendering helpers header and now everything looks like in the old version.

if (brightness > 0.0f)
    edgeTableClip->edgeTable.multiplyLevels (1.0f + 1.6f * brightness);

It's on Windows only. On Mac it looks good in both versions. Yes, probably we have noticed it just because we work with white-on-black text.

Thank you!

Thanks yann, I just tried to remove it as well, and I agree with you that for white-on-black it's much better without it! :)

perhaps a matter of taste, but for me there's no doubt that it's much less fuzzy

I changed it to make it match the style that OSX uses for white-on-black, and did lots of side-by-side comparisons where it was much better. I guess it depends on the weight of the font to a large extent.

I must admit I'm among those that prefer the old rendering. For dark text against clear background, I don't notice a change, but for white text with a dark background, the antialiasing seems to be less efficient with the change to the gamma, although the colour is improved (white characters do now appear as white as on mac, but their edges are more irregular, less finely drawn, than what they used to be).

And for some font sizes, the vertical hinting is too violent , I think, it really changes the shape of characters.