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

    Procrastinator

  • GMC Member
  • 3668 posts
  • Version:GM8.1

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

  • Retired Staff
  • 7262 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
  • 3383 posts
  • Version:GM8

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
  • 338 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
  • 3383 posts
  • Version:GM8

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
  • 5865 posts
  • Version:GM8.1

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

  • Retired Staff
  • 9314 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
  • 2055 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
  • 2956 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

  • Retired Staff
  • 7262 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
  • 2841 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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users