font not displaying the same if 2 pixels on the right

I am using a function to create a visual element that contains some images, a box, and some text.

I use that same function on 3 elements, with parameters to set the text and the position of that element.

For some reason, depending on the x and y passed to the function, the text will be displayed with “a broken font”. And if I move that x and y of a few pixels on the left, that will be fixed…

This happens for a lot of things (lines on a rectangle / graphics, images becomes blurry, …) so I’m very curious what could be the reason for this kind of behavior?!

What does it look like?

Capture d’écran du 2024-06-04 21-31-09

if you look at the last of the 3 boxes, the text is smaller (can see on the 8) the “+” is cut and the 2 too. It kind of looks like the “upper part” has been translated down one pixel / a full line of pixel disappeared.

It looks a bit like a rounding error. Is it Text or BitmapText?

Text and there is no rounding happening on my end. the x/y and sizes are all integer, and actually all even integer.