View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026220RunnerSurfacesPublic2017-04-17 15:572017-08-03 11:09
ReporterStewart Bishop 
Assigned ToMike Dailly 
PriorityLowSeverityC - GeneralReproducibility100%
StatusClosedResolutionNo Change Required 
PlatformOSOS Version
Summary0026220: Surfaces: [GMS2] Drawing some text letter by letter after using draw_set_font butchers the text
DescriptionI got in trouble in drawing letters by letters on a surface.
When I add 'draw_set_font(font)', the font become strange.

There is no problem in drawing a sentence at a time or in a font file.

More information, [^]
Steps To Reproduce1) Import the project
2) Run it
3) See that this is fine
4) Within the create event for the object uncomment the draw_set_font
5) Run it again
6) See that the text has now been butchered
1.4 Version
2.x Runtime Version9.9.1.524
2.x Runtime Version Verified In2.1.0.124
Attached Files? file icon Font corruption.yyz [^] (27,909 bytes) 2017-04-17 15:57

- Relationships

-  Notes
Mike Dailly (Manager)
2017-05-19 13:32

Not a bug.

Your simply adding on the offset BEFORE drawing, so in effect your drawing the current current character to the location of the next one. Moving it all into the DRAW event...

if ( char_n <= string_length(Message))
    _char = string_char_at(Message, char_n)
    draw_text(char_x, 0, _char);
    char_x += string_width(_char)
    char_n += 1 ;

Works as expected.

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker