View Issue Details

IDProjectCategoryView StatusLast Update
0027215Runner[All Projects] HTML5Public2018-02-07 14:49
ReporterzenAssigned ToMike Dailly 
PriorityMediumSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Platform OS OS Version
Product Version 
Target VersionFixed in Version 
Summary0027215: HTML5: string_height() incorrect when using newlines in the code editor
Descriptionstring_height() returns incorrect results on HTML5 in some specific cases. It appears as if it simply counts # characters to determine line count, which isn't always the same as newlines. Windows (VM and YYC) works as expected in all these cases.

When using a string that contains actual line feed characters, as opposed to # characters (for example, when pressing enter to insert a newline inside the string in the code editor, or loading from a file), the value returned by string_height() is too small (as if it was a single line).

For instance, a simple two-line string using 12pt Arial gives a height of 19 on HTML5, instead of the correct 38 on Windows.

Additionally, a single-line string that contains an escaped pound sign ("\#") gives the same height as a two-line string should do on HTML5.
Steps To Reproduce1. Start GMS and import the attached sample.
2. Run it for Windows - observe it gives 95 as the final value.
3. Run it for HTML5 - observe it gives 38 as the final value.

Repro: 100% in 1.4.1772
Additional InformationOriginal helpdesk ticket: http://help.yoyogames.com/tickets/131001
TagsNo tags attached.
1.4 Found In1.99.551
2.x Runtime Found In
2.x Runtime Verified In

Activities

Mike Dailly

2017-09-05 10:48

Manager   ~0055278

Last edited: 2017-09-05 14:53

View 2 revisions

fixed on gitlab

Also nededs: 7883cdbe6da6eabf51d88fe24c38bb8f635fca39