How to disable DirectX in JUCE 8?

sized

I put together this gif showing Arial Bold 10pt at 200% desktop scaling, with a few different antialiasing modes.

It looks like the glyph shapes are broadly similar between the two D2D rendering modes. Compared to the software renderer, D2D seems to hint quite aggressively. Text in this font rendered with D2D looks a bit less blurry. It also seems like the hinting attempts to separate details that might get lost at small sizes. e.g. in the software renderer, the dot on the i and j is almost joined to the rest of the glyph, and the inside stroke of the Q gets lost.

Some characters do look quite different depending on the renderer (S, a, 4), but I think this is because D2D’s font rendering is actually using the font’s hinting and size information, while the software renderer just uses the glyph shapes at some “default” size and scales them to the requested size. I see the same glyph shapes in the DemoRunner D2D as in Firefox for Arial Bold at 10px match, although Firefox seems to use ClearType instead of grayscale antialiasing.

I’m not sure exactly where to go from here. We can’t replicate the software renderer results using any of the built-in D2D rendering modes. We could probably get close by rendering glyphs to paths instead, but ignoring the hinting suggested by the type designer feels like a step in the wrong direction, and we’d also lose out on any performance benefits from rendering glyphs directly through D2D.

Given that it’s already possible to replicate the old behaviour by switching to the software renderer, and that replicating the same behaviour in D2D would introduce runtime overhead and maintenance cost, I don’t think it makes sense to try to match the software renderer style exactly in D2D.

This issue has been discussed a bit on the forum previously:

I agree with Anthony’s conclusions from that post. If you really disagree with the type designer about how the font is hinted at small sizes, then either stick with the software renderer, or remove the hinting info from the font.

I’m fairly sure that using the software renderer as suggested can be done currently, without requiring a flag to globally disable D2D. If you run into problems with this approach, please let us know, and we’ll try to help.