Author Topic: Wrong font size in HUD / lines of text are to close to each other  (Read 5086 times)

0 Members and 1 Guest are viewing this topic.

Offline jones34

  • 22
Wrong font size in HUD / lines of text are to close to each other
Hi

I got a problem with Blue Planet: War in heaven
The messages I get in my HUD are appearing to close to each other. Also the font size in the weapons part of the HUD is to big or just wrong.
Here is a screenshot of the problem: https://www.dropbox.com/s/56umh1zc8unoxts/screen0000.png?dl=0
There are some other little problems everywhere other fonts than the original ones from FS2 are used, but text in all briefings appears to be normal.

I installed Blue Planet with the FSO Installer and i am using an original copy of FS2. I got all the files listet as necessary for Blue Planet: War in Heaven.
All other mods i tried are working properly including Blue Planet: Age of Aquarius.
I also visited the troubleshooting pages but i did not finde a solution.

I hope you can help me.

Regards
Johannes

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Wrong font size in HUD / lines of text are to close to each other
Blue Planet has replaced the default retail Freespace2 font with Arial (I think). What you're seeing is pretty much as intended.  Any fixes would require either a new font (maybe a slightly smaller size?), or perhaps some code changes.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: Wrong font size in HUD / lines of text are to close to each other
I know the messages gauge can be adjusted to provide more vertical space for each line. The same is also possible for the weapons gauge, but the graphics for that gauge would have to be made slightly taller (which isn't difficult to do).
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline Yarn

  • 210
Re: Wrong font size in HUD / lines of text are to close to each other
It turns out that the weapons gauge is actually supposed to use the standard FS2 font, which in Blue Planet 2 is at index 3 instead of 0. BP2's HUD table explicitly sets the weapons gauge to use font 3; however, an FSO bug is changing it to 0. I think I can fix that.

Unfortunately, fixing that bug would cause another problem: Special characters like the arrows and the monospace 1 would disappear because there's currently no way to display special characters from any fonts other than those at indices 0 and 2. (Indices 1, 3, and 4 are fixed at 0, and index 2 is fixed at 176, and there's no way to change these right now.) Niffiwan, I know you had a font.tbl patch that would remedy this; have you forgotten about it?

EDIT: I reported the first issue here and attached a patch.
« Last Edit: September 13, 2014, 02:17:07 am by Yarn »
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: Wrong font size in HUD / lines of text are to close to each other
Monitor set to 16:9 resolution?

 

Offline jones34

  • 22
Re: Wrong font size in HUD / lines of text are to close to each other
Yes, my monitor is set to 16:9 resolution.

How can I adjust the messages gauge and how can I use that patch?
As I said, the problem with texts appears everywhere except the briefings, but for me only the messages are really critical.


Regards

 
Re: Wrong font size in HUD / lines of text are to close to each other
I meant the resolution in the starter (YAL or wxlauncher).

 

Offline jones34

  • 22
Re: Wrong font size in HUD / lines of text are to close to each other
I selected the native resolution of my monitor (1920 x 1080) in the launcher.

 

Offline Yarn

  • 210
Re: Wrong font size in HUD / lines of text are to close to each other
I fixed the messages and weapons gauges; the latter's graphics had to be enlarged slightly to fit the larger font. Download and extract the following to your blueplanet2 folder:

https://www.dropbox.com/s/sw2bmd4n815x0zz/abp2-hud-font-fix.zip?dl=1

(If any Blue Planet developers are reading this post, please review and commit this to Blue Planet 2; it will be absolutely necessary once Mantis 3106 is fixed.)


How can I adjust the messages gauge and how can I use that patch?
To adjust the messages gauge (or any gauge, for that matter), you would need to extract the HUD table from the VP files and edit it (which I've already done for you in the link above). As for the patch that's attached here, it can only be applied to the source code, which must then be recompiled; it's not something that can just be dropped somewhere and then take effect.

As I said, the problem with texts appears everywhere except the briefings, but for me only the messages are really critical.
Aside from the HUD, the only places where I've seen the problem occur are the ship and weapons selection screens, and the F1 overlays. The first two require a code change (and should be easy for me to fix); the last one requires tweaking the help.tbl file (which is in the FS2 VP files).
« Last Edit: September 15, 2017, 12:30:27 am by Yarn »
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline jones34

  • 22
Re: Wrong font size in HUD / lines of text are to close to each other
Thanks for your help.
I did as you said an extracted the download to my blueplanet2 folder but it doesn't have any positive effect.
The only thing is that the weapons gauge now has some quite fancy stripes as seen here :confused:

 

Offline Yarn

  • 210
Re: Wrong font size in HUD / lines of text are to close to each other
Do you have any *-hdg.tbm files in blueplanet2\data\tables by any chance? If so, remove them.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: Wrong font size in HUD / lines of text are to close to each other
That's a handy little fix. Thanks for that.
But hopefully we will get the "real" 16:9 adaptable HUD for blue planet sometime in the future. Coming from regular FSO the stretched HUD of blue planet does not look very nice at all.

 

Offline jones34

  • 22
Re: Wrong font size in HUD / lines of text are to close to each other
Removed the file I got there. Now it's working :)
Thanks again.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Wrong font size in HUD / lines of text are to close to each other
Unfortunately, fixing that bug would cause another problem: Special characters like the arrows and the monospace 1 would disappear because there's currently no way to display special characters from any fonts other than those at indices 0 and 2. (Indices 1, 3, and 4 are fixed at 0, and index 2 is fixed at 176, and there's no way to change these right now.) Niffiwan, I know you had a font.tbl patch that would remedy this; have you forgotten about it?

I haven't forgotten about the patch, but I must admit that it had slid waaay down my list of priorities.  I've updated it to the latest trunk, now I just need to do re-test it to make sure it's all working as expected.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Wrong font size in HUD / lines of text are to close to each other
Finally, I've tested my updated patch with BP2 (half the struggle was getting fonttool working so that I could see what the special character offsets were in the BP supplied fonts). I specifically didn't use your supplied VP to fix the existing issues.  Instead I tested both with and without the following fonts.tbl.

Code: (fonts.tbl) [Select]
#Fonts

$Font: font01.vf
$Font: font02.vf
$Font: font03.vf
$Font: bg01.vf
+Language: English
+Special Character Index: 127

#End

Here's the specific areas of the HUD that the patch affects:
1) Weapon linking icons
2) Match speed icon
3) Radar Infinity range icon
4) Radar small/large contact blips

With the table these characters appear as you'd expect
Without the table there are other characters substituted in the special characters places (not a great look, but possibly better than nothing - I'm open to feedback on alternative defaults)

Lastly here's the code; if there are no comments I'll commit this in a week or so.
https://github.com/niffiwan/fs2open.github.com/compare/font-offsets
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: Wrong font size in HUD / lines of text are to close to each other
The patch looks good except for three things:

1. One of the comment blocks in parse_fonts_tbl() says this:
Code: [Select]
// is the index sane?
// realistically, it has to be less than UCHAR_MAX to fit all the special chars, but not sure how many there are for all fonts & langs
// e.g. English font03.vf has 72 special chars?
It sounds like you might be confusing accented letters for special characters. Every font that has special characters has exactly 7, and they're always contiguous and in the same order. (No, font03.vf most certainly does not have 72 special characters, nor does it have that many non-ASCII characters.)

2. For the check below that, the second half of the condition should be special_char_index > UCHAR_MAX - 6.

3. Shouldn't there be a way to specify a special character index for all languages?
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Wrong font size in HUD / lines of text are to close to each other
Good pickups, thanks :) 

Re: 1) I'm not sure what I was on when I wrote that comment :nervous:, I'll fix 1 & 2 as you suggest. Per 3 I'll also add a way to set one special character index for all languages, probably as a "+Special Character Index:" entry after "$Font:" and before any "+Language:" entries.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Wrong font size in HUD / lines of text are to close to each other
Finally done :)

Here's a new example table (which deliberately includes a warning), I decided to use "+Default Special Character Index:" for the font-wide setting to avoid duplicate tokens for the different info.

Code: (fonts.tbl) [Select]
#Fonts

$Font: font01.vf
$Font: font02.vf
$Font: font03.vf
$Font: bg01.vf
+Default Special Character Index: 127
+Language: English
+Language: Latin
+Special Character Index: 12

#End

Code is at the same link as before: https://github.com/niffiwan/fs2open.github.com/compare/font-offsets

Let me know what you think.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: Wrong font size in HUD / lines of text are to close to each other
It looks like +Default Special Character Index applies only to languages that are listed below that don't have their own index (so in your example, it would apply to English and nothing else). You should also have it apply to languages that aren't listed.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Wrong font size in HUD / lines of text are to close to each other
I've finally got around to fixing that issue with the Default Special Character Index.  Here's the table I used for testing; the commented out sections should show the sorts of settings I was testing:

Code: (fonts.tbl) [Select]
#Fonts

$Font: font01.vf
$Font: font02.vf
$Font: font03.vf
$Font: bg01.vf
;+Default Special Character Index: 127
;+Language: English
;+Special Character Index: 126
+Language: Latin
+Special Character Index: 12

#End

Code is still at the same place - what do you think now? :)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...