Jump to content


Font creation code rewritten!


  • This topic is locked This topic is locked
54 replies to this topic

#1

  • Guests

Posted 22 March 2011 - 02:26 PM

Posted Image

The one on the left is the OLD font creation code, while the one on the right is the new code.


I thought I'd let everyone see the cool new font code that's in 8.1. It fixes several issues. The first being the Anti-aliasing is now correct, but the second (and probably more important) is that it now longer "clips" text. If you look at the lower font (which I've been told is a problem one), the Q and 2 on the left are cropped, while on the right they now appear correctly.

I have a feeling this will be the "must have" feature of 8.1 for many, so wanted to share it with you. We didn't know if we were going to manage to fix this in time so didn't want to get your hopes up. But it's in... and looks great!


Another cool little feature I added over the weekend was a proper "search". In the new Standard Edition you can now search ALL scripts for text. So no longer are you limited to searching just scripts for things, it'll now search scripts, objects, room creation code, instance creation code, timelines and triggers! This was another one we wanted in, but weren't sure we'd make it...

Enjoy!

#2 Davve

Davve

    GMC Member

  • GMC Member
  • 4043 posts
  • Version:GM:Studio

Posted 22 March 2011 - 02:28 PM

Great job! Glad that the search function will not only be limited to scripts :D
  • 0

#3 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7471 posts
  • Version:GM:Studio

Posted 22 March 2011 - 02:34 PM

Another cool little feature I added over the weekend was a proper "search". In the new Standard Edition you can now search ALL scripts for text. So no longer are you limited to searching just scripts for things, it'll now search scripts, objects, room creation code, instance creation code, timelines and triggers! This was another one we wanted in, but weren't sure we'd make it...

Excellent.

I'm just wondering though - does that mean that the menu option Scripts > Check all scripts also automatically checks scripts across all these items, or is that one still limited to the script resources only? I'm guessing they might have used the same routine to iterate through the scripts.

Edited by Smarty, 22 March 2011 - 02:40 PM.

  • 0

#4

  • Guests

Posted 22 March 2011 - 02:55 PM

That one menu item now searches ALL scripts at once.

#5 paul23

paul23

    GMC Member

  • Global Moderators
  • 3896 posts
  • Version:GM:Studio

Posted 22 March 2011 - 03:07 PM

has the font drawing also been sped up a bit? - Cause it IS quite slow (to the point I pre rendered all my text).


It might be me, but the second thing will probably be most usefull (and as I doubt structures made it) probably the best upgrade of gamemaker as a whole.. I fear it might not search in code action though?
  • 0

#6 gnysek

gnysek

    GMC Member

  • GMC Member
  • 544 posts
  • Version:GM:Studio

Posted 22 March 2011 - 03:12 PM

I wanted to write something good about that fonts.... but after I read about search feature I felt happy like Michael Phelps after he got first gold medal... little feature, but it will save many, many minutes for me, more than any other change.

It's good that you've updated fonts, since it's very easy to draw them on surface as strip, export as PNG and then import in Photoshop to create some nice-looking fonts with outlines etc., maybe now they will look even greater!
  • 0

#7 paul23

paul23

    GMC Member

  • Global Moderators
  • 3896 posts
  • Version:GM:Studio

Posted 22 March 2011 - 03:16 PM

I wanted to write something good about that fonts.... but after I read about search feature I felt happy like Michael Phelps after he got first gold medal... little feature, but it will save many, many minutes for me, more than any other change.

It's good that you've updated fonts, since it's very easy to draw them on surface as strip, export as PNG and then import in Photoshop to create some nice-looking fonts with outlines etc., maybe now they will look even greater!

uhm why don't you just type them inside photoshop to begin with?
  • 0

#8 Yal

Yal

    Gun Princess

  • Global Moderators
  • 8994 posts
  • Version:GM:Studio

Posted 22 March 2011 - 03:16 PM

Looks awesome! When one zooms in on that image, it's impossible to miss the difference. You really deserve a pat on the back for this.

Just one question: empty images for the space character. I've ran across several topics with people having problems with the space character being zero width since they used an empty subimage for the space character when creating a font this way. Oh... perhaps I misread "font creation code" and wrongly assumed it was about font_create_from_sprite()... If so, just ignore these two points.

(Of course, it's possible to add a white line of 001-alpha pixels to get a space the width you want, so this is not really an issue for creative users)



I welcome the option to search in everything as well - it's gonna be pretty nifty. If it's actually a search-replace, I promise I will paint my house green as a tribute to your marvellous work. :)

Edited by Yal, 22 March 2011 - 03:16 PM.

  • 1

#9 thatshelby

thatshelby

    GMC Member

  • GMC Member
  • 3823 posts
  • Version:GM8

Posted 22 March 2011 - 03:31 PM

Nice new font rendering? Awesome.
  • 0

#10 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9331 posts
  • Version:Unknown

Posted 22 March 2011 - 03:38 PM

Nice :) . I never really cared much about the anti-aliasing on fonts (though it is mighty pretty :P), but the clipping on characters annoys me to no end. I'm so glad that's fixed.

And being able to search in non-script code...heaven!

Thank you for your hard work, YYG :) .

-IMP ;) :)
  • 0

#11

  • Guests

Posted 22 March 2011 - 03:51 PM

It might be me, but the second thing will probably be most usefull (and as I doubt structures made it) probably the best upgrade of gamemaker as a whole.. I fear it might not search in code action though?


code action?? As in an object events "action" code? yep... searches in there too...

#12 Erik Leppen

Erik Leppen

    GMC Member

  • GMC Member
  • 2601 posts
  • Version:GM:Studio

Posted 22 March 2011 - 04:02 PM

Now this is great news. I was multiple times disturbed by the fact that font rendering was weird. Not just clipping, but entire columns of pixels were being removed from the left and duplicated on the right, on all symbols. I hope (and expect) this is all gone now. By the way, am I right that the new font rendering image contains hinting? The vertical lines seem to be aligned to whole pixels now.

Another cool little feature I added over the weekend was a proper "search". In the new Standard Edition you can now search ALL scripts for text. So no longer are you limited to searching just scripts for things, it'll now search scripts, objects, room creation code, instance creation code, timelines and triggers! This was another one we wanted in, but weren't sure we'd make it...

Little? This was one of my big wishes! :D ::lmao:: So great it's finally there!

Now I just hope it also searches in D&D action arguments :snitch:

Edited by Erik Leppen, 22 March 2011 - 04:04 PM.

  • 0

#13 LSnK

LSnK

    NaN

  • GMC Member
  • 1188 posts

Posted 22 March 2011 - 04:04 PM

[Full search]

Posted Image
  • 0

#14

  • Guests

Posted 22 March 2011 - 04:13 PM

Now I just hope it also searches in D&D action arguments :snitch:


Mmm... no doesn't search here.... are they gonna be that big? Do you really need to search them? I'll have a look and see how hard it'll be. Object/event/action searching is a massive pain.. loop inside loop inside loop inside...well.. you get the idea. But I'll look and see...

#15 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 04:25 PM

Another cool little feature I added over the weekend was a proper "search". In the new Standard Edition you can now search ALL scripts for text. So no longer are you limited to searching just scripts for things, it'll now search scripts, objects, room creation code, instance creation code, timelines and triggers! This was another one we wanted in, but weren't sure we'd make it...

This will be so useful. Great work!
  • 0

#16 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3536 posts
  • Version:GM:Studio

Posted 22 March 2011 - 04:47 PM

We love you mr daily! Great job! :wub:
  • 0

#17 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7471 posts
  • Version:GM:Studio

Posted 22 March 2011 - 04:49 PM


Now I just hope it also searches in D&D action arguments :snitch:

Mmm... no doesn't search here.... are they gonna be that big? Do you really need to search them? I'll have a look and see how hard it'll be. Object/event/action searching is a massive pain.. loop inside loop inside loop inside...well.. you get the idea. But I'll look and see...

If you do, I think you'd have to insert the keyword return to have it evaluated as a script rather than an expression. Because the expressions themselves would fail the script check.
  • 0

#18 commander of games

commander of games

    Kaos Kreator

  • GMC Member
  • 2883 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:03 PM

YES! I've never really encountered the clipping problem with fonts, but the fact that there is now proper anti-aliasing is great! Is it optional in the Font Properties though? Some people might like their text to not be anti-aliased. Not sure why they would(Maybe to give it a more 'crisp' feel?), but its always good to have options. :)

As for the new full searching... Well:


[Full search]

Posted Image


  • 1

#19 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:07 PM

Will you be able to do a search and replace for every piece of code too?
This would also be really useful.
  • 0

#20 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 22 March 2011 - 05:08 PM

O YES! I thought I am the only one irritated with the font drawing. Not only the clips but also the overlaps and lines and so on. They were just unusable (to the point that I, ironically, today remade all my fonts for my project into sprite strips.. all for nothing now I guess).

uhm why don't you just type them inside photoshop to begin with?

Font sprite strips need to have a specified width between characters. If you just copy them into a paint program they will just line up like normal characters, but we need them mono sized. That is what I did to my fonts as well. It takes like 10 lines of code to make a font strip export program in GM. Then modify as you wish (in my case I fixed all these bugs), and then use that strip into my project.

Edited by HaRRiKiRi, 22 March 2011 - 05:09 PM.

  • 0

#21 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 3045 posts
  • Version:GM8

Posted 22 March 2011 - 05:17 PM

Nice. What also would be nice is for you to make the gmk also store the fonts currently used. Therefor, you could share gmk's without the need to give font installations also. I don't know if this exists, but it never worked for me. The only font's that worked, were the default ones.

PS: It would be like totally cool that we could get font effects also :)
PPS: Yeah, I know it's possible trough surfaces, etc, but this way it would be much simpler for everyone.

Edited by Shadowrend, 22 March 2011 - 05:19 PM.

  • 0

#22 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:29 PM

Nice. What also would be nice is for you to make the gmk also store the fonts currently used. Therefor, you could share gmk's without the need to give font installations also. I don't know if this exists, but it never worked for me. The only font's that worked, were the default ones.

PS: It would be like totally cool that we could get font effects also :)
PPS: Yeah, I know it's possible trough surfaces, etc, but this way it would be much simpler for everyone.

This would mean you could easily illegally share fonts which would normally have to be purchased.
What kind of font effects do you mean?
  • 0

#23 thatshelby

thatshelby

    GMC Member

  • GMC Member
  • 3823 posts
  • Version:GM8

Posted 22 March 2011 - 05:30 PM

This would mean you could easily illegally share fonts which would normally have to be purchased.



Not exactly... the font can only be used inside the GMK, no where else. Also, what stops someone from making a font-spritesheet of this purchased font? Fonts are among the most easy things to pirate.
  • 0

#24 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 22 March 2011 - 05:31 PM

This would mean you could easily illegally share fonts which would normally have to be purchased.

By that logic you shouldn't be able to store sprites in the gmk either.

What kind of font effects do you mean?

Probably things like outline (which would be awesome).
  • 0

#25 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:32 PM


This would mean you could easily illegally share fonts which would normally have to be purchased.



Not exactly... the font can only be used inside the GMK, no where else. Also, what stops someone from making a font-spritesheet of this purchased font? Fonts are among the most easy things to pirate.

It'd be fairly easy to extract the font data, I'd imagine. Yes, I know fonts may be easy to steal anyway, but that's not really the point...
  • 0

#26 BlueMoonProductions

BlueMoonProductions

    BlueMoonProductions

  • GMC Member
  • 241 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:32 PM

Nice. What also would be nice is for you to make the gmk also store the fonts currently used. Therefor, you could share gmk's without the need to give font installations also. I don't know if this exists, but it never worked for me. The only font's that worked, were the default ones.


http://gmc.yoyogames...dpost&p=3719371
  • 0

#27 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:34 PM


Nice. What also would be nice is for you to make the gmk also store the fonts currently used. Therefor, you could share gmk's without the need to give font installations also. I don't know if this exists, but it never worked for me. The only font's that worked, were the default ones.


http://gmc.yoyogames...dpost&p=3719371

It compiles them into the EXE, but not the GMK, so you can't share files with new fonts.
  • 0

#28 YellowAfterlife

YellowAfterlife

    GMC Member

  • Global Moderators
  • 4028 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:36 PM

Right font AA? Finally. Well done!

Mmm... no doesn't search here.... are they gonna be that big? Do you really need to search them? I'll have a look and see how hard it'll be. Object/event/action searching is a massive pain.. loop inside loop inside loop inside...well.. you get the idea. But I'll look and see...

For that, it would be wise to allow searching in D&D's. And, hopefully, all D&D actions of codebox type.
After all, if you have seen some 'sources' of some Game Maker games, you might have noticed people prefer adding code directly to objects instead of making script's. Perhaps this is just a matter of clicks to be done.
Also, for some reason, events work a little bit faster than scripts (by ~5-7%). I was always wondering why does that happen.
  • 0

#29 commander of games

commander of games

    Kaos Kreator

  • GMC Member
  • 2883 posts
  • Version:GM:Studio

Posted 22 March 2011 - 05:44 PM

What kind of font effects do you mean?


Outline, glow, etc?

The ability to have a glowing font would be a godsend. I had to go through hell to get the fonts in my current game to work without lagging(Most of them have a glow effect around them, though that is optional on the smaller text). Eventually it boiled down to screenshotting the font in a GM window and pasting it into Photoshop. Unfortunatly I'm still unable to get the characters to align properly.
  • 0

#30

  • Guests

Posted 22 March 2011 - 05:46 PM

Search now works on all paramaters/arguments in D&D events. Will now even pick up arguments to scripts, or if you use a D&D function to set a variable.

No, you can't put fonts into the GMK; that's illegal. Sorry.

We do have a method of doing outlines and dropshadows we wantto use in the future, and while we're one step closer... we aren't there just yet. sorry.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users