- stat = GdipGetLogFontW((GpFont *)font, graphics, &lfw);
- if (stat != Ok) return stat;
I'm not sure it's an improvement, since you need to add these ugly casts. You should find a way that doesn't require that.
I don't see a way to avoid that, gdiplus APIs are broken in that regard.
It's true, I've had to do that sort of thing before because the gdiplus API is inconsistent in applying const.