As we discussed in this topic: http://www.juce.com/forum/topic/text-rendering-suggestion-need-jules-eyes
Subpixel rendering needs to know the pixel orientation of the monitor it is rendering to. I've got all other code set up for this, so that i know what monitors is what configuration etc., only thing is: LowLevelSoftwareRenderers don't know where they are drawing, beyond an offset to an arbitrary image. This means it cannot identify what pixel setting it should use, account for screen rotations/resolutions and so on.
Also, another thing that would be nice is, if the renderer knows whether it is rendering to a screen context or an image (similarly to isVectorDevice()).
Jules, how do you propose one solves this problem?
One solution, without breaking anything, would be to add something like:
virtual juce::LowLevelGraphicsContext * LookAndFeel::createGraphicsContextAdvanced( const Image & buffer, const Point<int> origin, const RectangleList<int> clip, bool isScreenContext, const Point<int> componentPosition) { // default implementation just forwards: return createGraphicsContext(buffer, origin, clip); }
Such that you can override this if you can use the additional information. All the normal places that would create a graphics context (like paint handlers) would now call this instead. I realize that this is really crippling the abstraction, but if you want to optimize rendering per-display you'll need something like this sooner or later..
Edit:
Also, another thing: Would it be possible to listen to system notifications related to screen resolution/resizing etc? Currently, they get dumped into Desktop::Displays::refresh(). If Displays could have a listener interface, that would be sweet.
Regards