Pages: 1
  Print  
Author Topic: Font character range behaviour  (Read 1856 times)
Offline (Unknown gender) BPzeBanshee
Posted on: December 26, 2014, 07:08:53 AM
Member
Joined: Sep 2012
Posts: 21

View Profile
In my tests of ENIGMA/LateralGM vs GM behaviour today I discovered that pressing the buttons to change the font character range when editing a font does not respond at all until you press either the + or Preview buttons underneath. In Game Maker 8.0 Pro it just fills a default character range as does Studio, but Studio seems to have multiple presets in a similar fashion as LateralGM does here. Studio however makes a preset but LateralGM does not.

Simple question I put here because I'm not entirely sure it belonged in the tracker, but is this intentional behaviour or not?
« Last Edit: December 26, 2014, 07:11:17 AM by BPzeBanshee » Logged
Offline (Male) Goombert
Reply #1 Posted on: December 26, 2014, 07:16:49 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
Yes this is entirely intended behavior, I found GM: Studio's behavior to rather counter intuitive if you will. It was also extremely buggy with setting the character ranges, so i decided to just limit each range to 1000 characters and let the user decide mostly for themselves. You're welcome to suggest changes to it to make it more intuitive.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) BPzeBanshee
Reply #2 Posted on: December 26, 2014, 08:23:27 AM
Member
Joined: Sep 2012
Posts: 21

View Profile
My only recommendation would be when making a new font file to add a default "group" to it straight away (not sure what to call it, whatever it makes in the bottom-left box when you press +) instead of making the user have to press + or Preview to add one, I can't really comment on anything else but from what I gather it seems fine otherwise.

When doing my test builds requiring only a basic font I didn't look twice at the font manager - right-click, add font, done like every other GM version - and then wondered how come my object wasn't drawing anything to the screen, only to find because it didn't have this "group" thing set it was drawing with no actual characters instead. Makes me look like an idiot I know, but it seems like a simple addition to make it less idiotproof, if you will.
Logged
Offline (Unknown gender) TheExDeus
Reply #3 Posted on: December 26, 2014, 09:48:07 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
It should automatically do it anyway. Like when you load a font and close the dialog immediately, you will be able to use the font and draw 0-255 range (ASCII) of characters. So you don't have to necessarily use the + button. I too find it confusing though and when I need specific ranges I tend to feel that I opened the font dialog for the first time. I have to press every button and only then do I understand how it works (until the next time I use it). But I don't have any specific things to recommend.
Logged
Offline (Unknown gender) BPzeBanshee
Reply #4 Posted on: December 27, 2014, 02:18:10 AM
Member
Joined: Sep 2012
Posts: 21

View Profile
If it's supposed to do that, then there must be a bug I guess, because it isn't working for me that way. Here's a screenshot of what I get:



Until I press + and get a character range in the white box on the bottom-left corner the font file is completely unusable.
Logged
Offline (Unknown gender) TheExDeus
Reply #5 Posted on: December 27, 2014, 05:10:53 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
The box will be empty, but it will work. Like try adding a font, then press Save without adding a range, and draw text with it:
Code: (EDL) [Select]
draw_set_font(font_0);
draw_text(10,10,"This is something!");
It will use the font. I guess the default behavior for LGM is that if no range is added, then it will add the default 0-255 one. It's not written anywhere and is not implied, so that is a problem. I think either LGM should say that or it should automatically add 0-255 range when you press "Save" on a font without any ranges.
Logged
Offline (Male) Goombert
Reply #6 Posted on: December 27, 2014, 08:09:08 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
That was partially my doing and the code somewhat existed in the plugin for it, because it was assumed that no character range was a corrupt font. I see now that has changed, maybe we should stop doing that and no character ranges means no character ranges, but then, why would anyone want a font with no character ranges? It would be unusable, for anything.

So anyway, let me get this straight, you guys think that the range should be added when the font is created also? I can see doing that, it is necessary to click '+' for the initial range, though it won't change much because you likely have to use the preview button to generate the ranges anyway. But sure we can do that, if I remember I originally wanted that anyway but just got to lazy to make it add one.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #7 Posted on: December 27, 2014, 04:21:22 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
I think the easiest way to do this by adding a 0-255 range whenever you press "Save" on a font, which has no ranges added. So the user doesn't have to press no "Preview" or "+" or anything else. It would work like it does right now, and it would just be clearer when they reopen the font editor, they would actually see the range (which was the confusing point here for the user).

What does GM:S do when you press Save on a font with empty ranges?
Logged
Offline (Male) Goombert
Reply #8 Posted on: December 27, 2014, 05:14:08 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
I'm not going to do that, I'm just going to populate it with one the first time it is created Harri.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #9 Posted on: December 27, 2014, 05:33:38 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Also works for me.
Logged
Offline (Unknown gender) BPzeBanshee
Reply #10 Posted on: December 28, 2014, 02:32:36 AM
Member
Joined: Sep 2012
Posts: 21

View Profile
Thanks guys, it seems you've hit the hammer on the nail.

I'll have to test again once I get back to the machine with GM:Studio installed, but Studio adds a character range of 0 to 127 if memory serves me correctly. 0 to 255 seems more effective still though. When drawing text with no character range at the moment it drew absolutely nothing, but did not generate errors.
Logged
Pages: 1
  Print