Page 1 of 1

wrapping text with PF? question to Frank?

PostPosted: Jun 24, 2004 @ 1:46pm
by Conan
I wanted to improve my in-game help by using text which wraps within the area it's given. Is there a way to do this with PF's 0.7.0 font support?
Currently I use Thomas's fonts from PF plus for all other text & DGI fonts for the help.

PostPosted: Jun 24, 2004 @ 2:42pm
by fzammetti
The VGA font support I added doesn't do wrapping as it's currently implemented. However, it's a pretty trivial thing to add. If you have to do some coding either way, it might be a good way to go because the fonts are by their nature fixed-width only, and therefore it's very easy to determine how much space a given string is going to take up. If Thomas' font functions do wrapping already, might as well stick with that (but I assume they don't or you wouldn't be asking :) ).

PostPosted: Jun 24, 2004 @ 3:37pm
by Conan
Thomas's font's don't but the GDI fonts do so I will stick with them. I only use them in the manual as they are quite slow. I get text wrap plus use of /r type features. I just wondered if the vga font did some of this as you appeared to have done it.

It's easiest to stick with what I have at this stage.
Game is now working fine & I'm getting lots of good feedback from beta testers.

PostPosted: Jun 24, 2004 @ 3:48pm
by fzammetti
Yep, that's a good way to go for that kind of thing.

Incidentally, you would think I had done this for my own game, but no :) My instruction pages is just a huge array in the code, and every 12 lines or so (I forget the actual number) is one page of instructions. If a page only uses 9 lines, then I literally have 3 empty elements in the array.

Just goes to show, even when you know you shouldn't do things a certain way, when you get it working one way, refactoring sometimes isn't a high priority :)