PDA

View Full Version : Fonts are foxing me



Skellan
February 15th, 2016, 11:28
I am trying to change the fonts in a theme. I have a theme I am modifying that already changes the fonts and I am thinking I can just experiment with switching out the font files and renaming them. However the fonts appear as a .fgf file and the fonts I have found to download are ttf files. Is it possible to change them to .fgf files and switch them out?

damned
February 15th, 2016, 12:20
have a look at the BigFonts extension - its in the 5e section somewhere. It uses ttf fonts as is. No need to convert them anymore.

Skellan
February 15th, 2016, 12:26
oh good idea! Thanks Damned

Mask_of_winter
February 15th, 2016, 14:45
You can turn any ttf into a fgf with the FGF font generator found in the Wiki (https://www.fantasygrounds.com/wiki/index.php/Developer_Guides).

Skellan
February 15th, 2016, 15:28
I see, thank you. I am planning to go 'full cheese' with this theme

Skellan
February 15th, 2016, 20:09
well colour me shocked, I got it working. thanks for your help folks

Mask_of_winter
February 16th, 2016, 00:59
Looking forward to seeing what you've done.
I've minimized fonts changes with Savage Worlds because if it changes the fonts on the Combat Tracker it never seems to fit the frame neatly. I hope you've had better luck with that!

Skellan
February 16th, 2016, 01:23
13050
13051

yeah, some of the fonts are really small - must be 6pt or something. I had to leave those

Skellan
February 16th, 2016, 01:26
Its Kevin Doswelk's sci-fi theme. I just messed about with it

Mask_of_winter
February 16th, 2016, 01:28
Nice job!
And here I thought our new game should be a Savage Star Wars game ;)

Skellan
February 16th, 2016, 02:03
Savage star wars would be fun :)

Skellan
February 16th, 2016, 16:08
Yep, font size 6 seems to do the combat tracker
13053

Skellan
February 17th, 2016, 00:40
Thought it would be fun to do fonts for war of the dead too

13054

damned
February 17th, 2016, 01:10
nice War of the Dead font!

ll00ll00ll00ll
February 21st, 2016, 17:26
Hello all... new to the forum, so if this is post is in the wrong place, please let me know.

Right now I'm working on modifying the 5e standard leather theme, I'm finding it fairly simple to just replace the existing .png's and modifying the fonts xml. The one thing that is catching me is the font color in the top of the party sheet. The font is currently a light yellow / tan color, I need to change it to black. I'm sure I can just override the setting in the graphics_fonts.xml, however I don't know what text field to override... does anyone know what "font name" to modify?

13102

Skellan
February 21st, 2016, 17:56
Nice to see you are having fun with this.

I am not 100% certain but it might be sheetlabel or sheetlabelsmall

ll00ll00ll00ll
February 21st, 2016, 21:52
It doesn't appear to be either of those, but thanks for responding, I'm going to try variations on those...

damned
February 21st, 2016, 22:42
namelabel
racelabel
classlevellabel
hplabel
...
...

damned
February 21st, 2016, 22:43
Also - you really should be doing this in an extension otherwise all your changes will get overwritten if (when) there are any updates to the 5e ruleset.

ll00ll00ll00ll
February 21st, 2016, 22:50
I am doing this in an extension... I copied over the components from the 5e.pak and I downloaded the more5e.ext from fg-com, between those two I'm bastardizing my own extension with simple file replacements and basic xml modifications. Thanks for the tips!

ll00ll00ll00ll
February 21st, 2016, 23:03
these don't appear to be the names... i've tried some variants that also don't work
partysheetlabel
partysheet-title
I'm going to keep randomly trying to figure it out, if i'm smart i'll keep a list of names that DON'T work... but i'm probably not that smart.

damned
February 21st, 2016, 23:04
Excellent :) Holler if you need any more help - oh and Welcome! I missed this was your first post :)

And a good way to track those down is like this -
Get notepad++ i looked at the window you were working on and saw Class & Level so I did a Find in Files for that text on the whole unpacked 5e ruleset. Came up nada so replaced the & with the ascii/html code (cant type it because it will just get replaced).
Found it in strings\strings_5e.xml and it belongs to ps_label_classlevel
Find in files on ps_label_classlevel and find <static textres="ps_label_classlevel" /> in ps\ps_main.xml


Use the Find in Files heavily!

Skellan
February 21st, 2016, 23:29
I'm going to keep randomly trying to figure it out,.

That's pretty much my approach. Good luck

damned
February 21st, 2016, 23:34
ololol - use Find In Files again on label_ps and you will see:

\ps\template_ps.xml

<template name="label_ps">
<label>
<color>FFF1CC</color>
</label>
</template>

ll00ll00ll00ll
February 22nd, 2016, 02:58
Well, no luck so far, even trying the suggestions above. I've included the early screen shot of what I'm working on. It's a vastly simplified version of the Wizards theme. I just can't live with a screen full of dragon heads (which eat up a ton of real estate), but I like the overall feeling of it. So I'm trying to use elements from the current paper character sheets. I still have a ways to go, the icons in the bar on the right are next on my hit list, and I'm not really happy with the colors int he combat tracker. Also, that damned party sheet text! Anyways, thanks for the help so far, if I end up finding it I will be sure to post it back here.

13110

ll00ll00ll00ll
February 22nd, 2016, 03:23
ololol - use Find In Files again on label_ps and you will see:

\ps\template_ps.xml

<template name="label_ps">
<label>
<color>FFF1CC</color>
</label>
</template>


The color in the above post (FFF1CC) is in fact the offending color. I tried changing it to "000000" and it didn't change in the party sheet. I also adjusted the code to follow the structure in the fonts.xml ( <color value="000000" />) which also didn't work.

I then went on a search for FFF1CC in all of the 5e folder, and the only other place it showed up was in the graphics_fonts.xml in a window title font, which is not the one I'm looking for.

frustrating!

Trenloe
February 22nd, 2016, 03:25
the color in the above post (FFF1CC) is in fact the offending color. I tried changing it to "000000" and it didn't change in the party sheet. I also adjusted the code to follow the structure in the fonts.xml ( <color value="000000" />) which also didn't work.
A few basic questions (sorry if you've already done this, but I need to check):
1) Where are you making the changes? Directly in a ruleset or in an extension? Or you working directly in the .pak or .ext files or within a directory in \rulesets or \extensions?
2) Are you reloading the FG instance after making the changes and saving the file/s - usually with /reload in the chat window?

damned
February 22nd, 2016, 03:35
This is the right piece of code - you should the following:

filename: ps\template_ps.xml

<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>
<template name="label_ps">
<label>
<color>000000</color>
</label>
</template>
</root>

and in your More5e extension.xml file add the line:

<includefile source="ps/template_ps.xml" />

and as Trenloe says - after each change /reload

Pro Tip: type /reload in chat window and instead of pressing enter drag it to a hotkey and you can click that hotkey for a fast reload.

ll00ll00ll00ll
February 22nd, 2016, 03:40
I've copied most of the 5e ruleset to another folder entirely. I am making my changes there. I then zip that folder, change the .zip to .ext and move it into the extensions folder. Then I restart fg completely, but I can't wait to try the /reload function

Trenloe
February 22nd, 2016, 03:48
I've copied most of the 5e ruleset to another folder entirely. I am making my changes there. I then zip that folder, change the .zip to .ext and move it into the extensions folder. Then I restart fg completely, but I can't wait to try the /reload function
Have you converted the ruleset code into an extension? Adding in extension.xml etc.? https://www.fantasygrounds.com/modguide/extensions.xcp

ll00ll00ll00ll
February 22nd, 2016, 03:49
This is the right piece of code - you should the following:

filename: ps\template_ps.xml

<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>
<template name="label_ps">
<label>
<color>000000</color>
</label>
</template>
</root>

and in your More5e extension.xml file add the line:

<includefile source="ps/template_ps.xml" />

and as Trenloe says - after each change /reload

Pro Tip: type /reload in chat window and instead of pressing enter drag it to a hotkey and you can click that hotkey for a fast reload.



YOU DID IT!!! that's the one! Thank you very much! I LIKE EXCLAMATION MARKS!!!!

13111

damned
February 22nd, 2016, 03:54
here is an extension to do only what you are asking here (except i used orange so i could see it on my screen)

ll00ll00ll00ll
February 22nd, 2016, 04:03
Have you converted the ruleset code into an extension? Adding in extension.xml etc.? https://www.fantasygrounds.com/modguide/extensions.xcp

Yes, or at least it's working as a selectable extension when I start up. I will definitely read through the link though. This just started off as me kind of poking around a little. I have very little (read: 0) coding experience, but I am fairly well versed int he graphical aspect of this. Fortunately between looking at the More5e extension and comparing it agains the 5e folder I've been able to glean enough to be dangerous. I'm certain I'm not doing it right, so thanks for the link I will be sure to read it.

Thanks again to everyone that helped out with this.