ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: BPzeBanshee on December 26, 2014, 07:08:53 am

Title: Font character range behaviour
Post by: BPzeBanshee on December 26, 2014, 07:08:53 am
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?
Title: Re: Font character range behaviour
Post by: Goombert on December 26, 2014, 07:16:49 am
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.
Title: Re: Font character range behaviour
Post by: BPzeBanshee on December 26, 2014, 08:23:27 am
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.
Title: Re: Font character range behaviour
Post by: TheExDeus on December 26, 2014, 09:48:07 am
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.
Title: Re: Font character range behaviour
Post by: BPzeBanshee on December 27, 2014, 02:18:10 am
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:

(http://i.imgur.com/vVvcV0v.png)

Until I press + and get a character range in the white box on the bottom-left corner the font file is completely unusable.
Title: Re: Font character range behaviour
Post by: TheExDeus on December 27, 2014, 05:10:53 am
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.
Title: Re: Font character range behaviour
Post by: Goombert on December 27, 2014, 08:09:08 am
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.
Title: Re: Font character range behaviour
Post by: TheExDeus on December 27, 2014, 04:21:22 pm
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?
Title: Re: Font character range behaviour
Post by: Goombert on December 27, 2014, 05:14:08 pm
I'm not going to do that, I'm just going to populate it with one the first time it is created Harri.
Title: Re: Font character range behaviour
Post by: TheExDeus on December 27, 2014, 05:33:38 pm
Also works for me.
Title: Re: Font character range behaviour
Post by: BPzeBanshee on December 28, 2014, 02:32:36 am
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.