[RESOLVED]I need a script... or at least need to know if it's possible...

Started by Satoh, November 21, 2008, 10:39:41 am

Previous topic - Next topic

Satoh

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.
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Fantasist

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"]
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Satoh

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...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Fantasist

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
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Satoh

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.
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Fantasist

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 -_-'
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

Actually it's enough if you have filecheck whether the font files are in the right folder.

if FileTest.exists?(ENV['SystemRoot'] + '\\Fonts\\' + FONTFILENAME)
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Satoh

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'
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Blizzard

Then you need a script that temporarily installs the font and uninstalls it after loading.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.