IMyTextSurface.MeasureStringInPixels(...) is rather off for some of the new displays

/dev/null shared this bug 15 months ago
Considered

This should estimate the width of a string in pixels, so we can scale to fit a screen.

However, its estimate seems rather off for some of the new panels, in particular the "keyboard" panels and the cockpit panels. I found this using the following script which makes all displays on grid say their various names and designations, and also tries to scale each output to optimal width:

Comments (2)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

photo
1

I have the same bug but I don't think this is the fault of IMyTextSurface.MeasureStringInPixels(...) but IMyTextSurface.SurfaceSize. I noticed, that many surfaces return a width of 512 but the resolution seems to be different. While a line of text on a normal screen at font size 1 fills the whole line, it needs fontsize 2 on keyboards to fill the line..