Hey man, sorry I didn't see your reply as I haven't checked the forum for a while.. Maybe PM me next time as it will generate a mail notification (?).
I have no idea why the intrinsics would cause any different behaviour. It works for all cases for me on OS X and Windows using the 2015 preview, on all optimization settings. Can you deliver some analyzable problems, images, reproductive code.. ? I think you're also using a bit older version than me, did you download the newest package? I have made some changes since I think, but shouldn't be anything changing anything...
Unfortunately, creating Graphics objects from images is hardcoded to use the standard software renderer (the last time I looked, anyway). Maybe you can compel Jules to change this behaviour such that it relies on the LookAndFeel settings instead (where this renderer kicks in).
Beware that subpixel rendering on images will potentially cause the images to have wrong colouring if viewed on a different display.
Hi again! More than one year later I’m still using your code for subpixel antialiasing on windows. I got more and more fed up with not being able to use MSVC full optimization and today I finally did a debug session to determine the cause. Turns out the problem was the weight alphamap not being explicitly zeroed when rendering starts. Lower optimization settings of MSVC always zero member variables, but the ultimate speed setting doesn’t.
So the solution that now finally works for me is to add the line
weight.clear();
to the CSubpixelScanlineRenderer constructor. All that template magic hindered my debugging efforts quite a bit
Note that this might not apply to the source posted earlier. I use a mix of different versions and it is possible the issue only came from that mixing.
For me the whole thing works absolutely lovely now and my GUI rendering is almost 100% the same on windows and OSX since I use this renderer for the fonts. The only remaining difference is OSX’ tendency to fatten fonts unnecessarily.
Thanks for the reply! The line you refer does clear the alphamap of the CSubpixelRenderer, but the problem I was facing was the alphamap of the weightmap which is defined in the weightmap template specializations. For instants in SubpixelRendering.h line 202