Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: corrected JIRA reference

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

Before 4.10 Beta 1 calling GetTextNumLines() with an unavailable combination of a font and a fontsize, the function would return some values regardless (if at least the fontname was correct).

However, it then calculated the returned number of lines based on a different font size (which the caller couldn't determine directly). 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 mods 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: 

Jira
serverEgosoft JIRA
serverId9d4eeb41-d1c2-3d89-8ea6-0964f358c464
keyXRUIMOD-148145