FONTDEFS. Create a font. Micro-guide.

Preparation.

Before you begin, download the number sprites from MEGA. And, move them to your wad.

By the way, the font was drawn by MechWarrior.

Create a font.

Create a FONTDEFSfile inside your wad,and place the following code there:

HPFONT
{
  0 STTNUM0
  1 STTNUM1
  2 STTNUM2
  3 STTNUM3
  4 STTNUM4
  5 STTNUM5
  6 STTNUM6
  7 STTNUM7
  8 STTNUM8
  9 STTNUM9
}

Let's look at the syntax of FONTDEFS.

font_name
{
  symbol picture
}
  • font_name – specifies the name of the font.
  • symbol – specifies the symbol.
  • picture – sets the picture that will be drawn when you enter the "symbol"

That's it, the font is ready. So, it's that simple.

Also, you can prevent the font from changing color,to do this, add:

NOTRANSLATION

To set the distance between the characters, we use.

SPACEWIDTH 10

where, the 2nd argument (10) indicates the distance in pixels.

Okay, now, you can load this font, from ACS.

We use a font.

For example, write the following ACS script:

script 101 ENTER {
  SetFont("HPFONT");
  print(i:101);
  Delay(1);
  restart;
}

Run.

As you can see, the font works.

Final result.

Пожалуйста отключи блокировщик рекламы, или внеси сайт в белый список!

Please disable your adblocker or whitelist this site!