• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Text endline proplem

Snipaste_2019-12-17_17-02-16.png

hello everyone.
i just finished my tutorial of "Space Rocks" game,and as you can see that there are 2 boxs in front of every text line,and i am every confused about it. even though i change the font type, they are still there.
i work on windows system,and the font type i choose is Arial.
i will be very appreciate if anyone can give me some help~~
 

chamaeleon

Member
View attachment 28069

hello everyone.
i just finished my tutorial of "Space Rocks" game,and as you can see that there are 2 boxs in front of every text line,and i am every confused about it. even though i change the font type, they are still there.
i work on windows system,and the font type i choose is Arial.
i will be very appreciate if anyone can give me some help~~
They are due to tabs in the beginning of your lines in the code that contains the string. Get rid of the tabs and the boxes disappear.
 

Yal

🐧 *penguin noises*
GMC Elder
These boxes are used for all characters that aren't in the font's character set, by the way. (Doesn't matter if they're well-defined in the font file if they're not added to the list of valid ranges in the font resource)
 

chamaeleon

Member
These boxes are used for all characters that aren't in the font's character set, by the way. (Doesn't matter if they're well-defined in the font file if they're not added to the list of valid ranges in the font resource)
As a general rule, agreed. In this case, it's a known issue for people following this tutorial. It's not the first time it has been asked. Tabs in the string making up that text are responsible. I'm not sure if you can actually add tabs to the character set covered by a font or not, or what it would do spacing-wise.. It's just not something I have ever tried.
 

Yal

🐧 *penguin noises*
GMC Elder
The manual states "just because these characters are recognized doesn't mean they're rendered" on the page for escape codes, but it was referring to things like vertical tabs and BEL characters. The text suggests that \t is supported, but it doesn't state it outright... not sure why literal tabs would behave differently?
 

chamaeleon

Member
The manual states "just because these characters are recognized doesn't mean they're rendered" on the page for escape codes, but it was referring to things like vertical tabs and BEL characters. The text suggests that \t is supported, but it doesn't state it outright... not sure why literal tabs would behave differently?
I have not been able to add any character range that has a lower end less than 32. I must admit that my knowledge of fonts, in conjunction with GMS 2 or not, is rather limited though. It has never been a primary concern of mine. Besides, what is a tab in the context of a GMS game anyway? The width equivalent of 1 space? 4 spaces? Some number of pixels? Align to room grid (just throwing that in there, as the closest equivalent to tab guides in word documents, etc.)

Edit: I imagine the inclusion of most escape characters are more for string purposes, reading and writing text to files, etc., rather than displaying on screen with a draw call.
 
Last edited:
Top