Horizontal offset for outline WFN font?

Started by Gal Shemesh, Wed 23/08/2023 14:31:42

Previous topic - Next topic

Gal Shemesh

Hi everyone,

I searched in the forum but didn't find anyone asking about this.

I'm using WFN fonts; 'Font 1' is the actual font where 'Font 2' is its outline. The thing is, the font is quite narrow, and so an outline around the letters kind of "close" upon the font, making it look even narrower... So I checked the Font 2 properties and saw that there's a VerticalOffset property, which works great for offsetting the font vertically. Though, I also wish to offset it horizontally, but there's no built-in option for that...

So, is there a simple script way to setting this up? (and if there's an option to make the outline font a little transparent that would be even better!)

*I know that I can edit the outline font, letter by letter, and to position each in a way that it will look in an offset, but that too much work and it won't give the freedom to dynamically change the angle of the outline font if I ever want to simple tune it.

Thanks
Gal Shemesh,
goldeng

Crimson Wizard

Quote from: Gal Shemesh on Wed 23/08/2023 14:31:42So, is there a simple script way to setting this up? (and if there's an option to make the outline font a little transparent that would be even better!)

No.

Although, in theory, you might script displaying 2 lines of same text with 2 fonts one above another.

Gal Shemesh

#2
Quote from: Crimson Wizard on Wed 23/08/2023 14:45:06Although, in theory, you might script displaying 2 lines of same text with 2 fonts one above another.
Hey, that's a great idea! Can you assist me to adding this to my custom 'say' function? Here's my code:
Code: ags
void sayNew(this Character*, int cue, String text)
{
  String cueString = String.Format("&%d", cue);
  {
    if (Speech.VoiceMode == eSpeechVoiceAndText && IsSpeechVoxAvailable())
    {
      AudioChannel* ch = Game.PlayVoiceClip(this, cue);
      this.SayAt(Game.Camera.Width /2, Game.Camera.Height + 15, -1, text);
      if (ch != null)
      {
        ch.Stop();
      }
    }
    else if (Speech.VoiceMode == eSpeechVoiceOnly && IsSpeechVoxAvailable())
    {
      this.Say(cueString);
    }      
    else if (Speech.VoiceMode == eSpeechTextOnly)
    {
      this.SayAt(Game.Camera.Width /2, Game.Camera.Height + 15, -1, text);
    }
  }
}
Gal Shemesh,
goldeng

Khris

You can use this: http://khris.ddns.net/agsfont/

First, select a TTF or OTF font, then adjust the outline to your liking.
Finally, download the wfn files and overwrite the ones in your game folder.

Gal Shemesh

That's awesome, @Khris. Thanks!
Though, unfortunately - my game uses bare WFN pixel fonts. So I can't upload my files there...
Gal Shemesh,
goldeng

Khris

Yeah, I was afraid that was the case. I might add support for that at some point.

SMF spam blocked by CleanTalk