Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GetTextNumLines() returns nil when called with unavailable font/fontsize

Before 4.10 Beta 1 calling GetTextNumLines() with a combination of a font and a fontsize which is not available returned some values regardless, if at least the fontname was correct.

However, it then calculated the returned number of lines and actually used text width based on a different font size (which the caller couldn't determine directly). So hence Hence the output for this incorrect call was kind of meaningless to the caller.

This issue was fixed, by issuing an error in this case now and returning nil. Since calling the function with an unsupported font/fontsize is quite meaningless and it's almost impossible to modders to display any text with that invalid combination, we expect that no real world example is out there which runs into the error case.

If however you spot a problem because of this change, please let us know.

See: