Jump to content


Photo

How to assign desired font to desired speech?


  • Please log in to reply
4 replies to this topic

#1 Eldin64

Eldin64

    GMC Member

  • GMC Member
  • 229 posts

Posted 01 January 2012 - 07:30 PM

Hi GMC!

I've made a few fonts, and wanted to make specific things have their own font.

For example, I wanted the HUD to have it's own font, and I wanted the pop message that comes out every once in a while to have a different font, but they all work using the same font (font0), I write draw_set_font(font0) in one, and draw_set_font(font1) in the other, but to no avail, it doesn't seem to work.

How can I assign the font I desire to the speech or HUD or whatever it is that I want to assign it to?

As always, thanks for the help.
  • 0

#2 Artaex Media

Artaex Media

    Artaex Media

  • GMC Member
  • 1528 posts
  • Version:GM8

Posted 01 January 2012 - 07:36 PM

draw_set_font(font0) should work.
Maybe check if your font is not set to Arial (default)
  • 0

#3 Eldin64

Eldin64

    GMC Member

  • GMC Member
  • 229 posts

Posted 01 January 2012 - 07:40 PM

draw_set_font(font0) should work.
Maybe check if your font is not set to Arial (default)


They are both different fonts and not the standard default one.

I think it's worth noting that I wrote both font codes, draw_set_font(font0) and draw_set_font(font1), each one in the object that I wanted the fonts to be specified to.

Was that the correct course of action? What is it that I'm missing?
  • 0

#4 Artaex Media

Artaex Media

    Artaex Media

  • GMC Member
  • 1528 posts
  • Version:GM8

Posted 02 January 2012 - 10:45 AM

You should put that in the draw event, just before where you start drawing the text.

Like this:
//Draw Event (controller object?)

draw_set_font(font0);
draw_text(x, y, "Drawing with font0");
//Draw HUD?

draw_set_font(font1);
//Draw other things using font1

  • 0

#5 amiel

amiel

    GMC Member

  • GMC Member
  • 1117 posts
  • Version:Unknown

Posted 02 January 2012 - 10:51 AM

very simple to assign a font,simply

Draw event

>>>>set font
>>>>draw text
>>>>set font
>>>>draw text

you can also put it in other events ,but better put it in draw event,cause that's also where you draw texts.
:whistle:

Edited by amiel, 02 January 2012 - 10:51 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users