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.
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"]
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...
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
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.
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 -_-'
Actually it's enough if you have filecheck whether the font files are in the right folder.
if FileTest.exists?(ENV['SystemRoot'] + '\\Fonts\\' + FONTFILENAME)
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'
Then you need a script that temporarily installs the font and uninstalls it after loading.