Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: HLD_Prophecy on November 26, 2017, 02:49:07 pm

Title: Need help with fiction viewer
Post by: HLD_Prophecy on November 26, 2017, 02:49:07 pm
Hey all! I need a little help with the fiction viewer.

I'm using a custom font; how do I make the text larger?

And how do I get the text to wrap properly instead of being one big block? Am I able to change that by editing the formatting in the .txt file?
Title: Re: Need help with fiction viewer
Post by: HLD_Prophecy on November 26, 2017, 03:12:19 pm
Addendum: my custom font does not seem to be working. It's in .otf format.
Title: Re: Need help with fiction viewer
Post by: bomb3rman on November 26, 2017, 03:23:31 pm
Hey all! I need a little help with the fiction viewer.

I'm using a custom font; how do I make the text larger?

And how do I get the text to wrap properly instead of being one big block? Am I able to change that by editing the formatting in the .txt file?

I don't know about the first question, but for the second I can tell you that you can work with the .txt file very well. Look into the attachment, there's one of my fiction viewer entries. It has many blocks and different colours just to give you an example. Hope this helps.

[attachment stolen by Russian hackers]
Title: Re: Need help with fiction viewer
Post by: HLD_Prophecy on November 26, 2017, 06:26:58 pm
Hey all! I need a little help with the fiction viewer.

I'm using a custom font; how do I make the text larger?

And how do I get the text to wrap properly instead of being one big block? Am I able to change that by editing the formatting in the .txt file?

I don't know about the first question, but for the second I can tell you that you can work with the .txt file very well. Look into the attachment, there's one of my fiction viewer entries. It has many blocks and different colours just to give you an example. Hope this helps.

Very nice, thanks!
Title: Re: Need help with fiction viewer
Post by: ngld on November 27, 2017, 07:14:58 pm
FSO only supports .vf and .ttf files AFAIK. You can convert your font to .ttf with a tool like Fontforge (https://fontforge.github.io/en-US/).
Title: Re: Need help with fiction viewer
Post by: HLD_Prophecy on November 28, 2017, 08:28:53 am
Wait, do I need a fonts.tbl set up as well as just having the font file in the "fonts" folder?
Title: Re: Need help with fiction viewer
Post by: AdmiralRalwood on November 28, 2017, 08:40:16 pm
Wait, do I need a fonts.tbl set up as well as just having the font file in the "fonts" folder?
Yes; FSO doesn't know what to do with font files until you tell it.
Title: Re: Need help with fiction viewer
Post by: HLD_Prophecy on November 29, 2017, 01:43:20 pm
Wait, do I need a fonts.tbl set up as well as just having the font file in the "fonts" folder?
Yes; FSO doesn't know what to do with font files until you tell it.

Aha, should have known. Thanks! But do you know how to change a font display size?
Title: Re: Need help with fiction viewer
Post by: ngld on November 29, 2017, 02:01:55 pm
You can set the display size with +Size: (http://wiki.hard-light.net/index.php/Fonts.tbl#.2BSize:) for TrueType fonts in the fonts.tbl.
Title: Re: Need help with fiction viewer
Post by: HLD_Prophecy on November 29, 2017, 05:32:39 pm
Aha, thanks. Hm, I need to research a bit before I ask. :P