If I add a BubbleMessageComponent to my application (x64, windows7, JUCE_USE_DIRECTWRITE) it won’t show up and eventually ImagePixelData::ImagePixelData will complain about zero height.
After some debugging it turns out that the win32 callback function DrawGlyphRun on line 64 in DirectWriteTypeLayout.cpp gets called from Windows w/ baselineOriginY=-1.#INF000 or 1.#INF000
I have to add the following line as the very first line of DrawGlyphRun to make it work properly
if ((int)baselineOriginY == 0x80000000)
baselineOriginY = 12.43f;
Subsequent invocations of BubbleMessageComponent.showAt works fine (and baselineOriginY will have a descent value), it’s only the first call of DrawGlyphRun that exhibits this strange phenomenon.
Is it a bug or am I expected to make some sort of graphics initiation before using DirectWrite?
It’s yesterdays tip, but it was the same last month I remember.
It happens only in x64, not x86.