PDA

View Full Version : Going FLIPPING INSANE with this font issue



Wookiee420
June 19th, 2017, 09:44
So I am having a horrible time changing font on Savage Worlds. PEG and ONI sent me fonts to use for their Sixth Gun Setting. I can change most all the fonts I want, I can even use multiple .ttf files to change the fonts, I can change the body fonts, but the header is being a jerk, i am trying to change the header and it somehow reverts to Arial. I can use 5e fonts for it, I can use the font I changed in the body, but when i use Matchwood or anything that they have given me it doesnt work, and as i said goes to Arial..i can change the color and the size of the font but it wont show the font that is being named. Yes it is in the folder. About 1/3 of the fonts i try work, i am so flipping frustrated

<font name="reference-h">
<ttf file="graphics/fonts/Matchwood WF Regular.ttf" name="Matchwood" size="24" />
<color value="#152d30" />
</font>


Helps my sanity please!!!

Trenloe
June 19th, 2017, 16:24
Compare the filenames of the TTF fonts that work and the ones that don't. Is there anything the jumps out at you as different between the two sets (like spaces in the filename, length of filename, etc.).

Also, run the FG console (type /console in the chat window), reload your ruleset (don't close the console), open some windows where the fonts are used and see if there are any warning messages related to the fonts.

Wookiee420
June 19th, 2017, 16:34
i thought about filename length, but this file works "palatino-italic-592e30a33633f.ttf" i will try the other suggestions and see what i can figure out, but i did shorten the filename to just "WF.tiff" and it didnt work..i will try the console command stuff and other ideas and report back to you :)

Trenloe
June 19th, 2017, 16:37
As a test, try converting the TTF into a fixed size FGF file using the "FGF Font Generator" at the bottom of the developer Wiki page: https://www.fantasygrounds.com/wiki/index.php/Developer_Guides

If that doesn't work, then it's probably an issue with the TTF file not being compatible with FG.

Wookiee420
June 19th, 2017, 16:57
so that test works, i can see the font when using the FGF

Trenloe
June 19th, 2017, 17:00
Either go with converting to FGF files, to check the console window to see if there is anything mentioned when using the TTF files and try to troubleshoot from there.

Wookiee420
June 19th, 2017, 17:08
so when i use the .ttf this is the console report


Runtime Notice: Reloading ruleset
Ruleset Warning: framedef: Left edge height (-27) of frame (referenceblock-brown) less than minimum suggested height (3)
Ruleset Warning: framedef: Right edge height (-27) of frame (referenceblock-brown) less than minimum suggested height (3)
Ruleset Warning: framedef: Middle height (-27) of frame (referenceblock-brown) less than minimum suggested height (3)
Ruleset Warning: Font (reference-h): Windows replaced specified font face (matchwood) with (Arial)
Ruleset Warning: Font (reference-r): Windows replaced specified font face (Pala) with (Arial)
Ruleset Warning: font: Logical font name maximum size exceeded (31). Name (reference-i). File (graphics/graphics_sw4.xml)
Ruleset Warning: Font (reference-bi): Windows replaced specified font face (Palatine BoldItalic) with (Arial)


EDIT:: This is the referenceblock-brown



<framedef name="referenceblock-brown">
<bitmap file="graphics/frames/refblock_brown.png" />
<offset>100,70,100,80</offset>
</framedef>

Wookiee420
June 19th, 2017, 17:13
if i shorten the file names all the formatting disappears

Wookiee420
June 19th, 2017, 17:17
so screenshot 1 is shortened names and filenames............screenshot 2 is long names that the console claims it cannot use
19465 19466

Trenloe
June 19th, 2017, 17:18
if i shorten the file names all the formatting disappears
More info on this please. What are we talking about now? What filenames? What formatting?

Trenloe
June 19th, 2017, 17:20
Looking at one error:

Ruleset Warning: Font (reference-h): Windows replaced specified font face (matchwood) with (Arial)

Your "Matchwood" definition in post #1 has a capital "M", whereas this name has a lower case "m". FG is case sensitive for configuration data.

Wookiee420
June 19th, 2017, 17:21
the heading is a font named Matchwood WF Bold
the body fonts are palatine (regular, bold, italic, and bold italic)

is it possible that i send you my extension and you look at it directly? i feel like that would cut down on the back and forth and we both would know what we are talking about because we can touch it

Trenloe
June 19th, 2017, 17:23
is it possible that i send you my extension and you look at it directly?
Sure. Please provide steps I'll need to recreate the issue (and details of the exact issue).

Wookiee420
June 19th, 2017, 17:24
yes i notice that font name error, i have multiple versions of that same font in my extension, i normally copy the file name (right click copy) when i place it in my XML and stuff to avoid this, i have tried both file names and everything and same thing

Wookiee420
June 19th, 2017, 17:26
what is your email?

Trenloe
June 19th, 2017, 17:34
yes i notice that font name error, i have multiple versions of that same font in my extension, i normally copy the file name (right click copy) when i place it in my XML and stuff to avoid this, i have tried both file names and everything and same thing
PM'd you my email. But, from what you're saying, I think you're getting confused with how FG references the <font> definition when being used within the FG code. FG uses the name="xxxxxx" tag within the <font> tag, not the name within the <ttf> tag.

So, the following font would have a FG name of "reference-h", not "Matchwood" or "Matchwood WF Regular" or similar.


<font name="reference-h">
<ttf file="graphics/fonts/Matchwood WF Regular.ttf" name="Matchwood" size="24" />
<color value="#152d30" />
</font>

Wookiee420
June 19th, 2017, 17:38
its possible, i sent it over just now, maybe seeing it "fixed" by you will make it click in my mind what i am doing wrong? idk. THANK YOU FOR YOUR HELP

Moon Wizard
June 19th, 2017, 17:49
The name attribute of the <font> tag is used to reference that instance/size of the font within the ruleset XML code.

The file attribute of the <ttf> subtag is used to specify the TTF file to use.
The name attribute of the <ttf> subtag is used to specify the name of the font within the TTF to get. (There can be more than one, and Windows requires you to request by name.)
The size attribute of the <ttf> subtag is used to specify the desired height in FG display units (i.e. pixels before scaleui setting)

Usually, when a TTF font doesn't load correctly, it's because the "name" attribute of the <ttf> subtag is not the actual full and specific name of the font specified in the TTF file. It could also be that the TTF file is defined in a way that doesn't allow us to request with the default font loading parameters. (ClearType quality, normal weight unless bold or weight tag used, variable pitch) Windows doesn't allow you to force a specific font to load, we can only request based on parameters and report back what Windows actually gave us based on your parameters.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd145037(v=vs.85).aspx

Regards,
JPG

LordEntrails
June 19th, 2017, 19:28
Question, do the clients also have the font loaded in order for it to render on their end? Or does only the GM have to have it loaded?

Trenloe
June 19th, 2017, 19:32
Question, do the clients also have the font loaded in order for it to render on their end? Or does only the GM have to have it loaded?
Fonts are included in rulesets and extensions. The GM pushes the required data to the players as usual.

LordEntrails
June 19th, 2017, 19:37
Fonts are included in rulesets and extensions. The GM pushes the required data to the players as usual.
Thanks. I was wondering because other programs I know of the font actually has to be installed in Windows for the end user actually use it.

Wookiee420
June 19th, 2017, 21:54
thank you for the help guys!!!

19469

LordEntrails
June 19th, 2017, 22:23
Looks cool, nice job.

Wookiee420
June 19th, 2017, 22:30
thank you :)