Custom Text & Fonts

Tutorial collection, comprehensive listings on main site.

Custom Text & Fonts

Postby Tutorial on Tue Mar 20, 2007 10:11 pm

category
Miscellaneous

description
Edit on screen text and also learn how to edit the fonts used in the menus and game.

keywords
custom, text, font, fonts, texts.

It's quite simple to use, create a simple level just to test it out, create a trigger brush (either trigger_once or multiple, it's up to you), then place a game_text entity in the level(as below).

Image

Now open up the game_text properties and enter a name so it will be displayed when the trigger brush is touched.

enter some message text, but do not include & or / or \ as this causes instability, or just won't display at all. This will be the text the player will see when he triggers the brush.

Now choose a colour for both options, in my example i've chosen red as it shows up quite well on the skybox background. and finallyadd a hold time of about 4 seconds, just so you get chance to see what the text says.

Then compile and run your map. Before any changes have taken place this is what the text should look like:-
Image

Now if you want to add that little bit of personalisation then go to your sourcemods/yourmodname/resource folder and open the ClientScheme.res file in notepad, now scroll right down to the bottom of this file and you should see this :-

Code: Select all
CenterPrintText      
{
// note that this scales with the screen resolution
"1"
 {
"name"      "Tahoma"
"tall"      "18"
"weight"   "900"
"antialias"    "1"
"additive"   "1"            
 }
}


now all you have to do is change the "name" portion from "Tahoma" to whatever font you like (bare in mind that only system fonts will be recognised, so trying to add anything other that that will need to be declared in the customfontfiles at the very bottom of the file) then save any chnages to the file, re-load the level and viola job done

Garamond Font:-
Image

Custom font:-
Image

> Example map here <

Hope this helps

Like Mr Happy says above, all changes here can affect all manner of personlisation to your game, the ClientScheme.res & SourceScheme.res file deals with the menu text, colourisation, hud, vgui all manner of stuff:-

Icons, hud and menu examples:-

Image
Image

CKS
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Simon on Sun May 27, 2007 2:18 pm

Thanks a lot for this tutorial. :)
Simon
Pheropod
Pheropod
 
Joined: Wed Jul 20, 2005 11:00 am
Location: Belgium

Postby Mr. Happy on Sun May 27, 2007 9:13 pm

Tutorial/CKS wrote:Like Mr Happy says above, all changes here can affect all manner of personlisation to your game, the ClientScheme.res & SourceScheme.res file deals with the menu text, colourisation, hud, vgui all manner of stuff:-


I said what above where?
Image
-You've just been happified!?
User avatar
Mr. Happy
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sat Dec 30, 2006 9:20 am
Location: Flyin' thru "da cloud" in the MotherShip

Re: Custom Text & Fonts

Postby Snap_shot on Thu Aug 07, 2008 8:35 pm

Is there a way to make this work for CS:S?
User avatar
Snap_shot
Member
Member
 
Joined: Fri Dec 16, 2005 7:59 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users