Skip to content

string_width() returns NaN on HTML5 #12697

Description

@Retrific

Description

When I use string_width(somesString) I get NaN back instead of a numeric value as expected and also seen on e.g. string_height, other platforms or previous game maker versions.

Might only be with the built-in font but still needs fixing.

Steps To Reproduce

Check return value of string_width("Test") in a new project while running on HTML5

Which version of GameMaker are you reporting this issue for?

IDE v2024.14.0.207 Runtime v2024.14.0.251

Which operating system(s) are you seeing the problem on?

Windows 10.0.26100.0

78bcf55f-6919-4145-9b01-bfc0288ef328

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gms2-bugIn-game bugs with the "GameMaker Studio 2" runtimesprojectThis issue has a sample project attached

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions