Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Satoh on November 21, 2008, 10:39:41 am

Title: [RESOLVED]I need a script... or at least need to know if it's possible...
Post by: Satoh on November 21, 2008, 10:39:41 am
Ok, I'm interested in TWO THINGS.

I want a script that can
A. Use a font that is in the graphics folder but not installed into Windows

OR

B. Check if a font is installed and use that font, else defaulting to Times New Roman or something...

(So that players can see the custom fonts I put in my games without having to install them)

Does this make sense?
Can it be done? I would prefer the former option to the latter, but I think the latter is more feasible.

Thanks.
Title: Re: I need a script... or at least need to know if it's possible...
Post by: Fantasist on November 21, 2008, 11:55:04 am
Quote from RMXP Help file:
Quotename
The font name. The default is "MS PGothic".

Include an array of strings to specify multiple fonts to be used in a desired order.

font.name = ["HGPGyoshotai", "MS PGothic"]

In this example, if the higher priority font HGPGyoshotai does not exist within the system, the second choice MS PGothic will be used instead.


Just add the following after the "begin" in "Main":
Font.default_name = ["your font 1", "your font 2", ...., "Arial"]
Title: Re: I need a script... or at least need to know if it's possible...
Post by: Satoh on November 21, 2008, 12:25:17 pm
So, it only works with installed fonts then I guess...?

That sucks.... oh well... I was really hoping not to have to force players to install fonts in order to get the font displayed...
Title: Re: I need a script... or at least need to know if it's possible...
Post by: Fantasist on November 21, 2008, 12:36:31 pm
Well, I wouldn't mind in the least if I had to install a font for a game. It's harmless and of no concern. I'd ask the players to install the required fonts. You could also search for Auto Font Install scripts. I think Wachunga made one, try rmxp.org
Title: Re: I need a script... or at least need to know if it's possible...
Post by: Satoh on November 21, 2008, 11:17:32 pm
Well... I suppose until someone discovers a way to void the necessity of installing the fonts beforehand... I'll say this is resolved... Thanks Fant.
Title: Re: [RESOLVED]I need a script... or at least need to know if it's possible...
Post by: Fantasist on November 22, 2008, 12:23:54 am
I dunno how it works but I'm guessing it involves the use of a system dll. Or maybe use the RGSS2 dll to load the Font class... ah, forget it -_-'
Title: Re: [RESOLVED]I need a script... or at least need to know if it's possible...
Post by: Blizzard on November 23, 2008, 09:03:45 am
Actually it's enough if you have filecheck whether the font files are in the right folder.

if FileTest.exists?(ENV['SystemRoot'] + '\\Fonts\\' + FONTFILENAME)
Title: Re: [RESOLVED]I need a script... or at least need to know if it's possible...
Post by: Satoh on November 23, 2008, 12:58:59 pm
yes but that still requires the font to be in Windows' Font folder right?

I wanted to run the font like 'Project/Graphics/Font.ttf'
Title: Re: [RESOLVED]I need a script... or at least need to know if it's possible...
Post by: Blizzard on November 24, 2008, 05:16:00 am
Then you need a script that temporarily installs the font and uninstalls it after loading.