Modifying the CSS HUD - Adjusting FONTS

Sectionsupdated steampipe

The adjustments to the clientscheme.res

The Font size problem in the hudlayout.res

The Hudnumber adjustments.

A download...just in case.


The adjustments to the clientscheme.res

Once you have the font you want to use you need to place the font file in the folders correctly and adjust the clientscheme.res. I picked "Hemi Head 426" (file name HEMIHEAD.TTF) for my font.

One thing about font names, they are rarely the same name as the actual file, this matters for the clientacheme.res names!

Place the font file in cstrike\custom\tut_hud\resource.

If you intend to make a VPK package ... place the font file in cstrike\custom\tut_hud_fonts\resource and DO NOT make it a .vpk ... supply it loose. Fonts do not work in a .vpk !

You now need to adjust the clientscheme.res in a couple of places at least. Go to the bottom of the file, you can see the standard ones in there named as , follow the naming format, in this section that is the file names of the font ... 

install ont_files

Depending on where you want to adjust fonts you now need to adjust a font in the "Fonts" section. I will continue with the Blue HUD on the previous pages and adjust the Hudnumbers fonts for now.

Go to the HudNumbers section around line 1103, change the font names there... "name"  "Hemi Head 426", save the file.

Run the game and have a look at your new font.


The Font size problem.

Now as we all know fonts have sizes, they also differ in size between font types. There is a lot of difference as you can see here, font choice does mean a size adjustment too sometimes.

My choice of "Hemi Head 426" font has done just that, this font is a larger Bold type ...

new font_too_big

The reason is mostly the hudlayout.res also need adjustment when giving the Hudnumbers a new font. And you thought this was easy...silly you!

First we need to get that font to a size we like, for the "Hemi Head 426" font I re-sized the default font "tall"  "28" setting in the Hudnumbers section to "24"...

resize font_hudnumbers

The Hudnumber adjustments. The rest of the fix is actually easy but time consuming and for some, confusing. I have a easy way that also introduces you to a new trick. First we will need to install a bind so we can edit on-the-fly, that is, run the game in a windowed mode, (see the Video tab to set that up) change a value, save and change it while the game is running.

We will work on the HudLayout.res in our text editor, change, save, then go back to the game and use the command "hud_reloadscheme".

What happens next is you will see the Hudnumber you adjusted ... move! So instead of guessing you have a kind of a WYSIWYG editor thing happening.

INsane is_on_fly

1. Run the game and set your Video options to "Run in a window" and get the size down a bit.

2. Install the bind, open console and place this in... bind "KP_END" "hud_reloadscheme" (alter the key if you like)

3. Shut down CSS, restart because a res change requires you to.

4. Edit the hudlayout.res in the appropriate places described below, save, go back to the game and enter the game, press your bind and watch it move.

Note: you may see some of the other panels move, it's OK, they will return to normal on the next shut down and restart of CSS.


The places you have to adjust are the "X" ("digit_xpos") and "Y" ("digit_ypos") positions of the Hudnumbers. If you have not adjusted things a lot you could get confused, just remember that most points are taken from the TOP LEFT corner.

In the case of adjusting HudHealth, HudHealth is a small panel, the size of it is the blackout area, the fonts fit inside.

Settings that are "X" are LEFT to RIGHT, starting at the left .... higher numbers make an object move towards the right.

Settings that are "Y" are UP to DOWN, starting at the top ... higher numbers make an object go down.

on the_fly_hudnumber

Adjust the "digit_xpos" and "digit_ypos" in the sections HudHealth, HudArmor, HudRoundTimer.

When you get to the HudAmmo and HudAccount you will notice more of these like "digit2_xpos", "digit2_ypos" and "bar_xpos", "bar_xpos" ...Don't panic, they are just the other font icons, they should be OK to leave. Here is a guide to what they are in case you want to move or re size them...

adjusting lower_right_numbe

A download ...just in case. Just in case you got absolutely mixed up and in case you want to check, here is a download of the tutorial HUD at this stage, light and dark areas...

The Tut__HUD_so_far     de dust20055

Enter Amount Copyright © 2011. All Rights Reserved.