1
Vote

Major text offset bug

description

Hello.

I'm using FW1FontWrapper for a project, and when drawing text, I've noticed that it's not exactly where I position it, but rather a few pixels below and to the right.

It turns out that it increases exponentially with font size. Eg. at font size 256f, it's drawn 98 pixels below where I specify on the Y axis, making it hard to eg. draw rectangles on top of it, or just position it correctly.

As a test, I tried to draw a rectangle at screen position 0,0 with the size of the text, and then draw the text at the exact same coordinates. The rectangle is the expected size, exactly where specified, but the text is outside the rectangle

Image

Drawing the text like
fontWrapper->DrawString(deviceContext, wideText, fontSize, 0.0F, 0.0F, D3DCOLOR_ABGR(a, r, g, b), FW1_RESTORESTATE);
I've tried all flags.

comments