PDA

View Full Version : Ruleset Warning: Could not find template font



cscase
August 26th, 2013, 02:22
Does anyone know what condition causes this warning? I've been getting this for some time and finally getting around to trying track it down, but I can't figure out what exactly I'm looking for. The message occurs on ruleset load:


Ruleset Warning: Could not find template font

I've tried intentionally jacking font references up to create another of these, but doing that either doesn't produce an error message, or it produces a different error message, depending on how I go about it. So I'm not sure what this warning is about. Can anyone point me in the right direction?

Thanks!

Andraax
August 26th, 2013, 02:33
Which ruleset? And is this the complete error message?

Trenloe
August 26th, 2013, 03:00
Generally a warning relating to a template means that when the template is being initially read something is missing - in this instance a template called "font" cannot be found. A warning is an indication of a potential problem *if* this template is subsequently used.

Do you later get an error message at some point relating to template "font"? An error would occur when template "font" was actually being used rather than just the warning when it is first being referenced.

Sometimes these errors occur when components have been removed from a ruleset because they are no longer being used, but references to them are left in other areas that are not used as well and so the warning occurs during initialisation but no actual error as the template is not being used.

Which ruleset is this? Have you searched for where a template called "font" is trying to be used and see if it is actually needed in the ruleset?

Trenloe
August 26th, 2013, 03:12
Additionally, font is a predefined FG component: https://www.fantasygrounds.com/refdoc/font.xcp

It may be that a specific font is being referenced that is no longer defined (usually in graphics_fonts.xml). You may need to do some more digging to find out exactly which font the code is trying to read. But, as mentioned above, if there is no actual error then the reference is not trying to be used - of course, to check for errors you need to access every aspect of the GUI to actually use all of the control which is when an error would occur.

cscase
August 26th, 2013, 03:29
Ahhh, well that makes sense. I was thinking it was saying, "Couldn't find a font for a template." But it sounds like you're saying it actually means couldn't find a template called "font." I'm working from the CoC ruleset (the old 2.0 one, not the new one that Moon is testing).

I'm not seeing anything in either the original ruleset or my modified one that looks relevant, but I may be searching for the wrong thing, or overlooking something important. Will keep poking around. Thanks!!

Dakadin
August 26th, 2013, 03:54
I've found it is easier to track them down if you enclose the name in quotes when searching for templates, so you don't get every time the template is used. In your case try a search for "font" and see if you find anything.

Moon Wizard
August 27th, 2013, 00:04
The font tag as an object definition is only relevant at the top level (which defines the font file to use for a given font name), and within certain windowcontrol derived objects (stringcontrol, numbercontrol) (which defines the logical font to use to display the data).

It sounds to me like a <font> tag is being used within the <sheetdata> tags of one of the windowclass definitions in the ruleset, since FG is attempting to treat it like a template which is what happens when a control is defined in a windowclass definition that is not one of the base classes (stringcontrol, numbercontrol, ...).

Cheers,
JPG

cscase
August 27th, 2013, 04:51
He shoots-HE SCORES!! This was spot-on, Moon. It looks like at some point while working with the identity list, I dropped a <font> tag where it didn't belong. After reading your post and knowing what to look for, I was able to Ctrl-F it upside the head. I would never have figured that one out. Thank you! It's going to be soooo nice to not see that warning any more every time I reload.