Jump to content

Guide: Change fonts used in game's interface


BleachFan

Recommended Posts

Why would I do this?

 

  • Shopping: pick a font that makes item properties easier to read.
  • Image Quality: a bolder, sans-serif font may look better to some people.
  • Non-native resolution: lower the res., increase graphic settings, and still have readable text!

 

How to Find the File

 

To change the fonts, we need to find a particular .xml file.

 

  1. Find your Sacred 2 game folder.
  2. Look in it for the locale subfolder.
  3. Then go into the next subfolder.

(On my install it's F:\Games\Sacred 2\locale\en_UK.)

 

In the folder there is a ListFontGroups.xml file. Backup this file now, if you wish.

 

 

 

Default ListFontGroups.xml:

 

<?xml version="1.0" encoding="utf-8" ?>

<suixml version="0.0.1.0">

 <!-- the Name-Attribute must be the internal font name -->

 <Fonts>
<Font Name="ZabriskieScript-Bold" File="ZabriskieScript-Bold.ttf"/> 
<Font Name="AntiquaSSK" File="AntqSSK.ttf"/>
 </Fonts>

 <!-- here you can use symbolic/aliased names for fonts -->

 <FontGroups>
<FontGroup Name="CaptionFontGroup">
  "ZabriskieScript-Bold"
</FontGroup>
<FontGroup Name="TextFontGroup">
  "AntiquaSSK"
</FontGroup>
 </FontGroups>

</suixml>

 

Font #1 is for captions, large buttons, etc.

 

Font #2 is for basically everything else: items, stats, whatever.

 

 

Change the font name to whatever you like and the file to name-of-font-file.ttf

 

The game can see and use any font file in C:\Windows\Fonts.

 

 

 

My ListFontGroups.xml:

 

<?xml version="1.0" encoding="utf-8" ?>

<suixml version="0.0.1.0">

 <!-- the Name-Attribute must be the internal font name -->

 <Fonts>
<Font Name="Monotype Corsiva" File="MTCORSVA.ttf"/>
<Font Name="Calibri" File="calibri.ttf"/>
 </Fonts>

 <!-- here you can use symbolic/aliased names for fonts -->

 <FontGroups>
<FontGroup Name="CaptionFontGroup">
  "Monotype Corsiva"
</FontGroup>
<FontGroup Name="TextFontGroup">
  "Calibri"
</FontGroup>
 </FontGroups>

</suixml>

 

I think these two fonts are included with Windows Vista / 7.

 

People running on Windows XP can try Arial, Tahoma, Verdana, etc.

 

 

Screenshot demonstrating my font:

 

http://img35.imageshack.us/img35/1875/big0027.png

 

Note: the screenshot was converted to a PNG file with dithering to keep the file size down. Graphics quality is reduced, but the text is beautifully preserved.

Edited by BleachFan
  • Like! 1
Link to comment

Furian: That could be the case. Mine was just okay. Opened it in Notepad, some copy-paste and done.

 

Just tried it for the hell of it, and those are quite nice font picks, Bleachfan. :)

Link to comment

Thanks for posting this BleachFan.

While I knew the method you have outlined, I was curious about the font you were using.

It looks very good on my 22" monitor now.

 

However I would like to increase the font size just a tiny bit.

 

Any ideas? :)

Link to comment
Thanks for posting this BleachFan.

While I knew the method you have outlined, I was curious about the font you were using.

It looks very good on my 22" monitor now.

 

However I would like to increase the font size just a tiny bit.

 

Any ideas? :)

 

Font sizes are stored in pak\skins-xml.zip\Fonts\Fonts.xml.

 

If you extract this file to pak\Fonts\Fonts.xml, you can freely edit it without changing the skins-xml.zip. Sacred 2 is smart enough to see the extracted file at that location and override the default file. To revert back to standard font sizes, simply delete your extracted file and the original file (still in the .zip) will be used again. This makes testing a snap.

 

However, much of the UI has areas hard-coded for text, so if you increase the font size much text will be clipped. The game's engine is also incredibly buggy for anything less than 12 pt fonts. It downscales the whole UI for resolutions less than 1280x1024, so it will clip/stretch/compress individual characters in different ways all on the same screen. Adding resolution upscaling on top of that is what makes low-resolution text unreadable in this game.

 

The only way to fix this for everyone (at any resolution) is to overhaul the UI layout. All work must be done for the lowest possible resolution (1024x768). When it looks good there, quality will be good for all resolutions. This makes the text rendering problems nearly unnoticeable but cannot eliminate them completely. But it's the best that can be done, IMO.

 

Changing the UI layout is a huge job due to nearly every element on every window requiring some kind of adjustment. Anytime you change font size, different elements react in different ways: some move right, some move down, etc. and all of them have to be realigned by hand. There are hundreds of small changes and tweaks to be made just to get the options windows looking good.

 

However, I have already finished the Options -> Graphics window. It took me > 5 hours. lol

 

Work-in-progress screenshots -- we will have readable text even at 1024x768!

 

 

The good news is that the UI mod scales beautifully to higher resolutions, so anyone will be able to use it at any resolution. People who have performance problems, for example, can turn down the resolution to get better 3D performance while retaining most of the readability. In the stock UI, fonts became unreadable at anything less than 1280x1024.

 

If you make the font please post a file with this:D

These fonts are built into Windows Vista / 7.

 

I will edit the original post to make this a bit clearer. :)

 

People using XP can try Arial, Tahoma, Verdana, etc.

Edited by BleachFan
Link to comment
I tryed this last night but it wont allow me to make any changes. Might that be an administrator thing for my computer?

Notepad (and some other programs) can't save to a system folder (e.g. C:\Program Files\Sacred 2 - Fallen Angel).

 

You can save your modified file somewhere else and then paste the file itself into the folder.

Link to comment

Thanks to everyone for the positive feedback! :)

 

EDIT: I finished the Options and Specials windows including all their sub-windows.

 

One bump in the road is that many unrelated UI elements share the same font entries in pak\skin-xml.zip\Fonts\Fonts.xml. It's hard to fix one part of the UI without breaking another. But it may be possible to separate them.

 

There's a bunch of templates I haven't figured out yet.

Edited by BleachFan
Link to comment

It may be possible to redo the UI to completely eliminate font downscaling, which seems to be at the root of all font quality issues with this game. Sadly, this means my mods so far to many windows and menus would be obsolete and the whole UI would have to be redone. The XML files could stand some rewriting anyway.

 

Minimum officially supported resolution is either: 1024x768 (horizontal) or 1280x720 (vertical). My current plan is to set a custom resolution of 1024x720 (I.e. least of both resolutions) and begin redefining all XML UI files around that value. Some things about scaled/absolute/relative window coordinates remain unknown.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up