Goto https://www.stucuk.netGoto https://www.atlanticaonlinewiki.comGoto https://www.game-requirements.comGoto https://www.owsupport.com
It is currently Sun Jun 13, 2021 6:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Font
PostPosted: Fri May 26, 2017 7:29 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Fri May 26, 2017 7:26 pm
Posts: 10
Hi everybody.

Is it possible to change the in-game font? If so, how do i do that?

Thank you.


Top
 Profile  
 
 Post subject: Re: Font
PostPosted: Sat May 27, 2017 9:57 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5015
Location: UK, Scotland
You can use parameters to set the font (By creating a shortcut).

-fontname Verdana
-fontfile verdana.ttf

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Font
PostPosted: Sun May 28, 2017 9:15 am 
Offline
Soldier level 0
Soldier level 0

Joined: Fri May 26, 2017 7:26 pm
Posts: 10
Thank you.
Can I do this for the whole game or should I insert these lines in every single text reference in the luas?
Also, should the ttf file be in the game directory or in Windows?


Top
 Profile  
 
 Post subject: Re: Font
PostPosted: Sun May 28, 2017 11:51 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5015
Location: UK, Scotland
moddernoob Wrote:
Thank you.
Can I do this for the whole game or should I insert these lines in every single text reference in the luas?
Also, should the ttf file be in the game directory or in Windows?


Its not a lua thing. Its command line parameters you can put into a shortcut. I think the fontfile is just for loading a font from the directory as some people never had the font in Windows. I think you may be able to get away with just using -fontname .

- https://superuser.com/questions/29569/how-to-add-command-line-options-to-shortcut

I could be wrong (Since its been a long time since i looked at the lua) but i think the game uses a single font for everything.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Font
PostPosted: Sun May 28, 2017 1:42 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Fri May 26, 2017 7:26 pm
Posts: 10
The game indeed does use only the Verdana font. It doesn't seem to be in the game directory as a separate ttf file, though.

I tried hex-editing the executable to use a different font, changing Verdana to Bimini and verdana.ttf to BIMINR_ttf, but I got a "cannot find font" error. The problem is that Verdana has 7 digits, and Bimini only 6. So I have a space in front (or behind) that the game includes in the font name it searches for, and thus cannot find. Hence the message: cannot find "Bimini " font, or cannot find " Bimini" font.

Do you perhaps know how to solve this problem?



EDIT: -fontname Bimini (internal name of font) worked (but -fontfile BIMINR_ttf does not: the game still uses the Verdana font).


Top
 Profile  
 
 Post subject: Re: Font
PostPosted: Sun May 28, 2017 4:25 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5015
Location: UK, Scotland
-fontfile is just what font file the game will try to load if its not already loaded by windows (So if your using a custom font which isn't in the windows font directory you need to place the font in the games directory and use this parameter as well as the -fontname one). Its simply for people who didn't have the font (IIRC some people reported issues with the font being missing from there system or something).

-fontname is literally the font it will use.

If your hex editing a string and want to make it be smaller just make the characters you don't want to exist be a zero (As in the character with the ID of 0 not the number 0). No clue if it will work, but strings are normally ended with a 0 character ("Null Terminated Strings")

P.S The game technically isn't designed to use other fonts as it was originally hard coded for verdana, but i exposed them via the command line parameters in one of the patches.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
 Post subject: Re: Font
PostPosted: Mon May 29, 2017 10:47 am 
Offline
Soldier level 0
Soldier level 0

Joined: Fri May 26, 2017 7:26 pm
Posts: 10
That's what I normally do: overwrite the superfluous digits with double zeros... but this is the first time that i see a software interpreting the zeros as spaces. The length of the font name must be specified elsewhere, for this behavior to occur... Anyway, with your command line parameter workaround it also works, so...
Many thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group