Qhimm.com Forums

Miscellaneous Forums => Archive => Topic started by: Hellbringer616 on 2009-06-16 19:10:04

Title: changing default font
Post by: Hellbringer616 on 2009-06-16 19:10:04
I was just thinking while installing a new font on my computer, Is there a way to change the font of FF7? or is that pretty much hard coded on there?
Title: Re: changing default font
Post by: Covarr on 2009-06-16 22:09:36
Can textures be replaced with higher-res textures? That might be worth looking into, since the default font doesn't look all that great when running the game at higher resolutions.
Title: Re: changing default font
Post by: Hellbringer616 on 2009-06-16 23:29:35
Exactly what i was thinking  :-D
Title: Re: changing default font
Post by: Covarr on 2009-06-17 04:58:19
Well, if it is a single texture with all the fonts on it, and it's fetching part of the image for each character, then you couldn't really replace the font with anything except a higher resolution of the same thing, or at the very least a new font with the same proportions.

If each letter is its own texture, that might not be as much of an issue, but you'd still want to keep sizing intact to prevent text from overflowing the window (or does the engine determine the necessary size of the window on the spot rather than having pre-sized windows per textbox?)

Since I've never actually done any modding or looked at any of the game's data files or even read any tech documents, the best I can do is make educated guesses and deductions. Would somebody who actually knows something care to comment?
Title: Re: changing default font
Post by: Hellbringer616 on 2009-06-17 05:00:02
Same issue. Never modded anything :oops:

Anyone who has the FF7 file formats and structures?
Title: Re: changing default font
Post by: nfitc1 on 2009-06-17 06:12:11
It's been a while, but:

http://forums.qhimm.com/index.php?topic=7928.msg98936#msg98936

should have some idea of how to do it.
Title: Re: changing default font
Post by: JordieBo on 2009-06-23 10:47:25
I'm sure that if you just extract all the texture files from something_us...? It is just a texture file, which is easily replaced. I think it's world_us? Or I could be completely wrong.  :-)
Title: Re: changing default font
Post by: Prince Lex on 2009-07-28 06:11:14
Sorry for the necroposting, I was going to create a new thread but thought it better to post here, since it's completely related and not that old.

Has anyone had any luck with this?

I unpacked the menu_us using lgp tools and found the font textures. Using biturn I converted the usfont files to bmp, then opened in Photoshop, converted to RGB and applied a blur filter. Then converted back to grayscale and saved in 8-bit.bmp. Then converted the .bmp's to .TEX's using biturn again. Created a new menu_us archive using lgptools and started the game.

(http://i52.photobucket.com/albums/g40/phoenixheaven/th_Untitled.png) (http://s52.photobucket.com/albums/g40/phoenixheaven/?action=view&current=Untitled.png) - WTF!?

What did I do wrong?
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 06:12:14
I had the EXACT same issue...

So i can't be much help
Title: Re: changing default font
Post by: Aali on 2009-07-28 06:17:49
Well, first of all, don't use biturn, it's very good at creating broken tex files.
Also make sure you preserve all the palettes.
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 06:18:20
What other program is there? Also how would we do that?
Title: Re: changing default font
Post by: Prince Lex on 2009-07-28 06:21:39
I tried using img2tex aswell, but for some reason it just gave me a bmp file as output. Confused.
Title: Re: changing default font
Post by: Aali on 2009-07-28 06:23:20
Try Omega, and never convert the image to RGB.
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 06:34:47
I can't find a link to it :(

But thats my issue, i thought it HAD to be RGB XD
Title: Re: changing default font
Post by: Prince Lex on 2009-07-28 06:45:17
I know it has to be grayscale, but you can't edit much in grayscale with photoshop. I also can't find a link to omega. Tried using Ficedula's textool but I get an access violation.

Hellbringer, if you have any luck, will you post screenshots? I need to get this font fixed, it grates me so much.
Title: Re: changing default font
Post by: Aali on 2009-07-28 06:47:43
It's not just that it has to be greyscale. The palette has to be the same, you can't replace it with an image with a different palette or it will look like crap. (Unless you edit all of the 16 palettes)
Title: Re: changing default font
Post by: Phun on 2009-07-28 09:41:10
Correct me if I'm wrong, but I believe the game uses DirectDraw to draw font.
Title: Re: changing default font
Post by: Aali on 2009-07-28 10:05:54
Allow me to correct you, the game uses textured quads to draw font.
Title: Re: changing default font
Post by: Phun on 2009-07-28 10:29:59
Allow me to correct you, the game uses textured quads to draw font.

I thought this was only necessary in games using Direct3D.
Title: Re: changing default font
Post by: Aali on 2009-07-28 10:37:38
What does that have to do with anything? Modern games are even more likely to use textured quads.
Everything in the PC versions of FF7/FF8 is done using 3D graphics, sprites/backgrounds etc are just textured quads.
Even the software driver emulates 3D graphics when it is drawing the fonts (And no, this is not as wasteful as it sounds)
Title: Re: changing default font
Post by: Phun on 2009-07-28 10:49:09
What does that have to do with anything? Modern games are even more likely to use textured quads.
Everything in the PC versions of FF7/FF8 is done using 3D graphics, sprites/backgrounds etc are just textured quads.
Even the software driver emulates 3D graphics when it is drawing the fonts (And no, this is not as wasteful as it sounds)

Allow me to correct myself: GDI.
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 17:16:52
I know it has to be grayscale, but you can't edit much in grayscale with photoshop. I also can't find a link to omega. Tried using Ficedula's textool but I get an access violation.

Hellbringer, if you have any luck, will you post screenshots? I need to get this font fixed, it grates me so much.

Yeah i'll post screens if i can ever figure it out haha, I'll release it if i can ever figure it out :-D
Title: Re: changing default font
Post by: Aali on 2009-07-28 17:39:49
Allow me to correct myself: GDI.

Say what?
Title: Re: changing default font
Post by: Borde on 2009-07-28 18:56:50
Errr... Img2Tex cannot write BMP files. It could have written a file with .bmp extension, though. If that's the case, just rename it. By the way, Img2Tex SHOULD respect the original pallete. It would be nice to see if it actually does so. :-P
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 21:47:16
Well with any luck i'll be putting your program to the test.

Quick question, since i will probably scale to 512x512 and then make a new layer semi transparent and make redraw all the text (think it will look better that way, feel free to say otherwise) do i HAVE to match the colors perfectly? Or no?
Title: Re: changing default font
Post by: Aali on 2009-07-28 22:25:29
Well, here's the deal; the game changes palettes to change the color of the text. So if you only modify the first palette, only gray text will look good, the rest will look like crap. So you can either modify all of the palettes to match your "base image" with new colors, OR you can leave the palettes alone altogether and draw the new image with the original palette.
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 22:29:54
Since i barely know how to even work photoshop this will be a challange haha.

Is there a way to import the palettes so Photoshop will only use those colors? Or no?
Title: Re: changing default font
Post by: Prince Lex on 2009-07-28 23:18:53
When you load the gif or bmp in photoshop the palettes will load automatically.
Title: Re: changing default font
Post by: Borde on 2009-07-28 23:28:56
I've never tried photoshop, but I recall at least my of Paint Shop Pro only allowed you to use colors form the picture pallete.
Palletized images are tricky. You should repect strictly the original image layout. I mean, if you have for example a letter filled with solid white and outlined in grey, you should keep it that way. That means you should avoid using any kind of interpolation (antialiasing, bilinear, etc.). Otherwise most likely you will end up getting oddly colored pixels around the edges of the letters. I think there are some filters (2xsai maybe? don't know) that respect strictly the original colors.
Title: Re: changing default font
Post by: Prince Lex on 2009-07-28 23:36:33
I'll try that later. I wonder if there's a 2xSai filter plugin for photoshop?  Hmm....
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-28 23:56:11
Dang i was planing on using Anti Aliasing to make them look better when i redrew them..

whats this 2xSai? also is there a way to use it on the pictures in photoshop to make the text smooth

EDIT: there is also something called hq2x (also 3x and 4x) for image smoothing, would that work as well?

info here

http://web.archive.org/web/20070717064839/www.hiend3d.com/hq4x.html
Title: Re: changing default font
Post by: Phun on 2009-07-29 00:14:33
Allow me to correct myself: GDI.

Say what?

Final Fansty VIII (not sure about VII) uses DirectDraw + GDI.
Title: Re: changing default font
Post by: Aali on 2009-07-29 00:34:37
No it doesn't.

I would know. (http://forums.qhimm.com/index.php?topic=8306.0)

It's all textured quads, sent to the graphics driver, which may or may not be using DirectDraw. GDI was only used for debugging.
Title: Re: changing default font
Post by: titeguy3 on 2009-07-29 01:14:49
Speaking of Image Scaling, Aali, would you happen to know if it's possible to implement a 2xSai or hq4x or (insert scaling algorithm here) smoother to the 2d field images in FF7?
Title: Re: changing default font
Post by: Aali on 2009-07-29 01:30:33
Of course it's possible. But it would look terrible.
See people's attempts at applying various filters to the backgrounds in the Palmer thread (and others).
It's not just a 2D image.
Title: Re: changing default font
Post by: pyrozen on 2009-07-29 01:31:55
i was just thinking the same thing after getting the custom GFX driver working.  I found quite a few of the worldmap textures, and they are very small scale and was wondering if it is possible to make higher-res, more detailed versions.  I suppose this would be quite tricky with an 8-bit palette though.  

If someone were to create higher-res versions(say 128x128), can you create your own 8-bit palette, or do you have to stick to the one that the original texture used? And would the game even be capable of scaling a larger texture, or would it just take a small snippet from the corner at original size?  I ask because i have been wanting to contribute to the modding of this game, and world texture creation is the first thing i've found that i could actually do without having learning anything new.

lee
Title: Re: changing default font
Post by: Phun on 2009-07-29 05:11:39
No it doesn't.

I would know. (http://forums.qhimm.com/index.php?topic=8306.0)

It's all textured quads, sent to the graphics driver, which may or may not be using DirectDraw. GDI was only used for debugging.

DirectDraw is used for transferring surfaces to the screen, and GDI is used for rendering.

-----

I assume FFVII and FFVIII are very similar, which is why I assume text is rendered the same in FFVII as it is in FFVIII. As I previously stated: if you want to change the default font, you must hook the GDI API. Take a look at this (http://msdn.microsoft.com/en-us/library/dd162615(VS.85).aspx) article for information on enumerating installed fonts.
Title: Re: changing default font
Post by: Aali on 2009-07-29 05:40:21
I don't seem to be getting through to you, so let's see what John McGinley can do (http://www.youtube.com/watch?v=WrjwaqZfjIY).

The font is a texture (a number of textures actually) in menu_us.lgp, they are rendered using the standard methods used to render everything else in the game, they don't have anything to do with GDI and they don't have to use DirectDraw anywhere in the process.
Title: Re: changing default font
Post by: Phun on 2009-07-29 05:43:19
I don't seem to be getting through to you, so let's see what John McGinley can do (http://www.youtube.com/watch?v=WrjwaqZfjIY).

The font is a texture (a number of textures actually) in menu_us.lgp, they are rendered using the standard methods used to render everything else in the game, they don't have anything to do with GDI and they don't have to use DirectDraw anywhere in the process.

I'll see about this.

P.S. I love Scrubs.
Title: Re: changing default font
Post by: Aali on 2009-07-29 05:50:27
Scrubs is (was) a great show. RIP

Please show some facts to support your statements (so I can disprove them :-P).
Title: Re: changing default font
Post by: Phun on 2009-07-29 06:35:30
Scrubs is (was) a great show. RIP

Please show some facts to support your statements (so I can disprove them :-P).

You appear to be correct, though I was right about DirectDraw. I simply assumed they would use GDI to render font.
Title: Re: changing default font
Post by: Aali on 2009-07-29 15:22:46
You were right about DirectDraw? What about the OpenGL driver? Does that use DirectDraw? Granted, it's not accessible through the normal config app, but it's still there and it sure as hell doesn't need DirectDraw.
Title: Re: changing default font
Post by: Phun on 2009-07-29 15:41:33
You were right about DirectDraw? What about the OpenGL driver? Does that use DirectDraw? Granted, it's not accessible through the normal config app, but it's still there and it sure as hell doesn't need DirectDraw.

The game uses it for surfaces and whatnot, that's all.
Title: Re: changing default font
Post by: Aali on 2009-07-29 16:05:57
My point was, why replace the font through DirectDraw when you can simply change the texture and make it work regardless of how the .exe draws it.
Hopefully you've already realized it's a bad idea. :-P
Title: Re: changing default font
Post by: Phun on 2009-07-29 16:17:24
My point was, why replace the font through DirectDraw when you can simply change the texture and make it work regardless of how the .exe draws it.
Hopefully you've already realized it's a bad idea. :-P

I have.  :-D
Title: Re: changing default font
Post by: Hellbringer616 on 2009-07-30 17:08:30
Alright messing around in photoshop i was changing the image type (since it's indexed color and you can mess with it if it is)

I found a way to save the color table, is this the palette?