PDA

View Full Version : Creating fonts



Goblin-King
January 8th, 2005, 08:55
Fantasy Grounds uses a custom font file format. To generate FG fonts based on any system font, there's a small utility program we have used in producing the files in the d20 ruleset, which you can download from the link below:

Fantasy Grounds font generator (https://www.fantasygrounds.com/filelibrary/FGFontGenerator.exe)

It's a simple program with not much in the way of help files. To create a font, select it on the first dialog that you get running the utility, and press OK. Select a location to place the FGF-file (in your ruleset folder), and save. Use a font tag to use the file and to define text colors (see the d20 ruleset file data/bmpfonts.xml for examples).

msd
January 8th, 2005, 14:09
Fantasy Grounds uses a custom font file format. To generate FG fonts based on any system font, there's a small utility program we have used in producing the files in the d20 ruleset, which you can download from the link below:

Fantasy Grounds font generator (https://www.fantasygrounds.com/filelibrary/FGFontGenerator.exe)

It's a simple program with not much in the way of help files. To create a font, select it on the first dialog that you get running the utility, and press OK. Select a location to place the FGF-file (in your ruleset folder), and save. Use a font tag to use the file and to define text colors (see the d20 ruleset file data/bmpfonts.xml for examples).

Looks interesting!. FYI...Is bmpfonts.xml a custom file? I don't see that file in my data directory.

Thanks,
Matt

Goblin-King
January 9th, 2005, 08:59
Looks interesting!. FYI...Is bmpfonts.xml a custom file? I don't see that file in my data directory.

We're still investigating this, but you might get around it by using the utility mentioned in this thread (https://forums.fantasygrounds.com/viewtopic.php?t=155).

Cantstanzya
April 8th, 2005, 07:35
Is there any way to use FG fonts in other programs? I would like to be able to choose the FG font in programs like Word or Gimp or any other program that lets you use custom fonts.
Currently I am having to type what I want in a FG character sheet and then take a screen shot by push alt-printscreen. I then paste this into a graphics program and have to modify it to change the colors if I want it in another color. It would be so much easier if I could just choose the font in the program I am working with.

Zane_Marlowe
April 14th, 2005, 14:33
I don't have the bmpfonts.xml custom file either, and I did a full install of 1.03. I actually built a character sheet and need two different fonts on it, a larger and a smaller version, and I'm not sure what the parameters are to indicate which I want. I saw in another thread that there's a <font name="name"> thing you can do, but does that let you use full path information, or do you have to have the bmpfonts.xml file in the <include> section of the base.xml first?

Goblin-King
April 14th, 2005, 17:18
I don't have the bmpfonts.xml custom file either, and I did a full install of 1.03. I actually built a character sheet and need two different fonts on it, a larger and a smaller version, and I'm not sure what the parameters are to indicate which I want. I saw in another thread that there's a <font name="name"> thing you can do, but does that let you use full path information, or do you have to have the bmpfonts.xml file in the <include> section of the base.xml first?

Try the utility in this thread (https://forums.fantasygrounds.com/viewtopic.php?t=155) to get the bmpfonts.xml file.

If it's more convenient for you, here's a snippet from it that shows you how to take fonts into use that you can place in any file you include into your ruleset:


<font name="chatfont">
<fgffile name="data\fonts\regular.fgf" />
<color value="#000000" />
</font>


The color value is a code similar to the one used in html.

Goblin-King
April 14th, 2005, 17:22
While I'm at it, I might as well reply to this one I missed for some reason. :oops:


Is there any way to use FG fonts in other programs? I would like to be able to choose the FG font in programs like Word or Gimp or any other program that lets you use custom fonts.
Currently I am having to type what I want in a FG character sheet and then take a screen shot by push alt-printscreen. I then paste this into a graphics program and have to modify it to change the colors if I want it in another color. It would be so much easier if I could just choose the font in the program I am working with.

Most windows fonts normal users have can't generally be distributed legally as such. The point of the licenses is usually to allow you to use them for a purpose, but not redistribute directly, which is what being able to use them in Word etc. would basically be.

For what it's worth, you can change the color of fonts used in the ruleset definitions.

tahl_liadon
December 7th, 2005, 13:40
i wanted to check out how this works. this is what i did:

- put the regular.fgf, regularitalics.fgf, regularbold.fgf, regularbolditalics.fgf, diemod.fgf, and diemodsmall.fgf in a new directory called "original_fonts".

- create the fonts using the fontgenerator app and saved them in the /data/fonts directory, replacing the exact ones that i moved into "original_fonts"---in essense, i've substituted the original fonts with the new fonts without messing around with the file names.

- place the bmpfonts.xml in the /ruleset/d20 directory---all fonts reference in this file point to the /data/fonts directory.

- launch fg.

now, in theory, i should see some changes in the fonts, right?

i don't. everything looks the same as it were set default. what did i miss, and where would i see the font change?

Crusader
December 7th, 2005, 14:40
As I understand it, the /data folder isn't actually used, but a copy of the files contained in the resource-archive. To be able to use your custom fonts, put them in a sub-directory of your rulesystem instead and change bmpfonts.xml accordingly.

tahl_liadon
December 7th, 2005, 17:14
thnx for the tip, but it is not working for me.

has anyone got it to work? would you please give step-by-step instructions?

also, does the font format (true type, open type, etc...) have anything to do with it...i.e. does fontgenerator convert only a specific font format?

Crusader
December 7th, 2005, 20:05
Yeah, I did and that's how I did it. I used a TrueType.

Crusader
December 7th, 2005, 20:07
You did make a copy of the d20-directory, right?

pentay
January 21st, 2006, 13:19
This thread might help. Fantasy Grounds defaults all d20 stuff to the "resource.pak" file. Deleting the fonts there (after backing up the file) and referencing them in your ruleset should work. You may have to edit some .XML files as well.

Check out my thread on custom rulesets (https://forums.fantasygrounds.com/forums/showthread.php?t=3875).

Goblin-King
January 22nd, 2006, 15:13
This thread might help. Fantasy Grounds defaults all d20 stuff to the "resource.pak" file. Deleting the fonts there (after backing up the file) and referencing them in your ruleset should work. You may have to edit some .XML files as well.
I'll mention it here as well that modifying resource.pak is not a good idea.

The font definitions for the d20 ruleset are stored in data/bmpfonts.xml, and to use your custom fonts, you should create them as new files (the best place is under your own ruleset folder somewhere) and add/modify the <font> definitions (again, in your own ruleset) to point to the new files.

danielpryor
February 3rd, 2006, 19:48
OK, the thread is mesed up, where's the link to that font generator at guys?! LOL!

Ged
February 3rd, 2006, 22:54
Oops, it was missing all right. It has been restored and this (https://www.fantasygrounds.com/filelibrary/FGFontGenerator.exe) link should point to the correct file once more.

danielpryor
February 4th, 2006, 08:19
Oops, it was missing all right. It has been restored and this (https://www.fantasygrounds.com/filelibrary/FGFontGenerator.exe) link should point to the correct file once more.

Thanks!.................

HeavilyMental
February 20th, 2006, 01:01
One thing I found out on my system is that you have to make sure you log in as HOST first. At least, that is if you crashed FG trying to load in VIEW LOCAL CHARACTER mode...like I did numerous times before I tried that.:eek:

Tailz Silver Paws
February 23rd, 2006, 01:51
Has anyone made a "Modern" looking font?

Veelivar
February 26th, 2006, 19:10
I may be being a little slow here sorry, but can I just check this process?


Create a new font using the tool (myfont.fgf)
Put it in my ruleset (MyRuleset\fonts)
Extract bmpfonts.xml from the resource.pak
Put a copy of it in my ruleset (MyRuleset\fonts)
Import this new bmpfont.xml file, rather than the default one in my base.xml
<includefile source="rulesets\MyRuleset\bmpfonts.xml" />
Add my new font to my bmpfont.xml file with a unique name
<font name="myfont">
<fgffile name="rulesets\MyRuleset\fonts\myfont.fgf" />
<color value="#000000" />
</font>
use my new font????


The bit I'm getting hazy on is how to say, "in this numbercontrol/stringcontrol tag use this (myfont) font?"

is it something like:


<numbercontrol name="intelligencebonus">
<bounds rect="112,261,34,23" />
<font name="myfont"/>
...


or some thing else entirely?
Cheers,
Dan.

Crusader
February 27th, 2006, 08:20
Yes, that sums it up very nice. Just to be sure though, it might just be a typo but you need a space between the "myfont" and the /> but otherwise it looks fine.

Veelivar
February 27th, 2006, 10:12
so the last bit about how to specify the font to use in the <stringcontrol> tag is correct?

I was just guessing and havn't actually tried it yet :)

Dan

Crusader
February 28th, 2006, 10:26
Well, that's a damn good guess then! :)

tdwyer11b
March 15th, 2006, 20:05
Is there a way to just change the font size and color of the original fonts by using code?

Crusader
March 16th, 2006, 13:30
Colour - yes, size no. To change colour you need to create a new fontentry for it. Check the bmpfonts.xml in the data-folder for an example. Also note that you need to put this entry in your custom ruleset to use it.

tdwyer11b
March 16th, 2006, 18:17
when I follow the instructions in this tu all I get is a black box where my text is supposed to be.

Snikle
April 2nd, 2006, 00:35
I seem to be able to change all the fonts minus the one used on the character sheets, which one is this?

Ged
April 2nd, 2006, 06:42
From the top of my head: "defaultstringcontrol" and "defaultnumbercontol". Sorry if I recall wrong.

GMBazUK
August 2nd, 2006, 07:26
Im still havent BIG problems with this.

1.I created a new font using the utility, and put the font in myruleset/data/fonts folder
2. I modified the myruleset/bmpfonts.xml to include the additional font
<font name="myfont">
<fgffile name="rulesets\MyRuleset\fonts\myfont.fgf" />
<color value="#000000" />
</font>
3. I then opened the charsheet.xml (in my ruleset) and in the specific stringcontrol (inventory) which I wanted the font applied to added the line:

<font name="myfont"/>
4. the base.xml has already been modified to point to myruleset/data/fonts

I then loaded up FG. All the tabs on the character sheet opened fine except for the one with the modified font entry where upon FG froze up and I had to shut it down by End Task.

Help!
Baz.

Crusader
August 2nd, 2006, 07:48
Well, I think it might be because you placed the font in the folder myruleset/data/fonts, but when you referenced to the fgf-file you specified myruleset/fonts. If you change the path it'll hopefully work better.

GMBazUK
August 2nd, 2006, 09:45
Hi Crusader

A fellow Harn fanatic I read.
In response, typo Im afraid.
I did point to the font in myruleset/data/fonts.

The only thing I didnt do was generate a space between the font name and the /> as suggested earlier. Either way, it doesnt want to work.

Im assuming that by placing the font name in the stringcontrol it overrides the font that would ordinarily be used for that string, thus enabling you to change the font for only a part of the sheet.

I wasnt supposed to put the fontname definition in the window class was I?

Baz.

Crusader
August 3rd, 2006, 13:05
Yes, that I am! :)

Damn, I was sure that was it. And I guess that you've included the myruleset/bmpfonts.xml in the base.xml?

Your assumption is correct, and it's not supposed to be in the windowclass.

GMBazUK
August 3rd, 2006, 14:00
Oh sure, instead of adding another entry in base.xml I modified the entry in the base.xml to point to the myruleset/data/bmpfonts.xml.

Do you think I need to modify the db.xml in anyway Crusader?

Baz.

Crusader
August 4th, 2006, 09:34
Changing the font by itself shouldn't need any changes to the db.xml, the change of font only affects how the data in the db is displayed, it doesn't make any changes to the data. Do you know if you've made any other changes to that page (changing data types on controls)?

GMBazUK
August 4th, 2006, 16:23
I finally managed to track it down.

The software Im using to create the xml, colours the tags regardless of whether they're correct or not (so it seems), so I didnt spot a missing letter in the xml tag, which has now been rectified.

Thanks again though Crusader.

Baz.

Stuart
August 4th, 2006, 18:40
Sorry Baz - I've been away for a while. Crusader has it nailed (of course), no need to change base.xml. You will know if something is wrong with that file as FG will crash within a few seconds (less than 5 on my machine) if it is incorrect in any way. Other xml file issues take longer to crash FG after the loading screen is displayed.

Look forward to the results ... and creating a character;)

Pervezcer
August 7th, 2006, 12:37
Where you get it???

rauvnos
August 27th, 2006, 04:16
Moved my reply to the help boards.

Last_resort_33
May 10th, 2007, 09:19
Ok, sorry if I'm being thick. I am using FGII and want to change the fonts on the character sheets (for the skills and ability names etc) I have been through the bmpfonts.xml and changed all of them to a colour other than black... but the stuff on the character sheet remains black. where am I going wrong?

joeru
May 10th, 2007, 15:52
Ok, sorry if I'm being thick. I am using FGII and want to change the fonts on the character sheets (for the skills and ability names etc) I have been through the bmpfonts.xml and changed all of them to a colour other than black... but the stuff on the character sheet remains black. where am I going wrong?

You're probably modding the default d20 ruleset, not?

Make a copy of the d20 ruleset directory, rename it to something you like, and then modify the bmpfonts.xml. And if you want to play a d20 system with those changes, you also have to modify the definition.xml in all the modules (they're archives that you can open with e.g. WinRar or 7-Zip) to make them support your new ruleset.

Last_resort_33
May 10th, 2007, 16:29
no, I AM modding the original D20 ruleset...

joshuha
May 10th, 2007, 16:48
no, I AM modding the original D20 ruleset...

Well that won't work unless you recompile your changes and replace the d20.pak with your recompiled rulest. I DO NOT RECOMMEND THIS because it will break you playing with other d20 default users and they won't connect to you correctly.

The correct way to do it is to create a new folder in the ruleset folder like myd20 and copy all the files in there. The good thing with FG 2.0 is everything is internally referenced so there are not paths you need to change in every file. The only bad thing is if changes happen in the default d20 ruleset because of a patch yours won't have the fix unless you re-unpak it and copy it over to your custom ruleset. And if you have modified any of those files you'll have to reapply you changes to the update file.

Still its not very difficult and keeps everything nice and internalized.

Last_resort_33
May 10th, 2007, 19:39
Gods... No I am modding a COPY of thd D20 Ruleset... sorry, I'm not good at making myself clear and I've only been doing this a few days.

I sorted it anyway. Turns out that I thought they were black and are in fact a sort of brown colour, so my "find/replace" wasn't working properly

*facepalm*

fuleng
August 18th, 2007, 09:31
i am getting the same problem like tdwyer11b. all i get are black boxes where my newly created font should be. any advice?

zidanee
January 20th, 2008, 21:46
Hello

I am trying to play with my friends using fantasy grounds but have encountered that the software does not allow to chat in Cyrillic. Is it possible to integrate Cyrillic font in FG?

I am not much of an programmer and following the instructions on this page, was only able to create a Cyrillic font but had no luck getting it all to work. Could anyone help me out please? Currently when I switch from English to Russian it just prints rubbish, like the coding is wrong. Is there any way around this?

Thanks in advance!

Griogre
January 20th, 2008, 23:41
I'm afraid FG does not have support for unicode. I don't think you are going to be able to get Cyrillic to work.

Snowcat
July 3rd, 2008, 11:21
I'm afraid FG does not have support for unicode. I don't think you are going to be able to get Cyrillic to work.

I got Cyrillic fonts working in FGII, using FG Font Generator and MoonWizard's ruleset for bmpfonts.xml file.

Griogre
July 3rd, 2008, 18:33
That's nice work Snowcat. If it works with the default d20 ruleset, it would be nice if you posted so others could download it.

Snowcat
July 9th, 2008, 09:44
I'll try to do it for default d20 ruleset, but I have strong suspicion that they work only because my operation system supports Cyrillic.