Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial]Changing game fonts

(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
Once again, another thing that sucked when we were running luna online.
Game fonts.

New luna plus clients come with 2012_EYA font which is located in Data\Interface\Windows\2012_EYA.tff file. It's realy useful but just replacing tff file will not help us since font face name is set in client code. So let's change it.

  1. (Optional) Open LUNASolution if you are using my repack
  2. Open luna client project
  3. Now go to 'Interface'->'MODULE'
  4. There find and open file 'cWindowManager.cpp'
  5. Around line 196 you will find earlier mentioned 2012_EYA.tff file and below that few font settings.
  6. We will edit some stuff here.

Now as far as I know there are 9 FONT presets for luna client. FONT0 is the main one used for interaface. The rest of presets are used for interface header, shops and hell knows what else. I will focus on first preset but you can edit other presets and see what you get.

By now I have following settings for first font preset:
Code:
	font.lfHeight = -11;
	font.lfWidth = -6;
	font.lfEscapement = 0;
	font.lfOrientation = 0;
	font.lfWeight = FW_NORMAL;
	font.lfItalic = 0;
	font.lfUnderline = 0;
	font.lfStrikeOut = 0;
	font.lfCharSet = DEFAULT_CHARSET;
	font.lfOutPrecision = 0;
	font.lfQuality = ANTIALIASED_QUALITY;//NONANTIALIASED_QUALITY;//PROOF_QUALITY;//CLEARTYPE_QUALITY;
	font.lfPitchAndFamily = 0;
	lstrcpy(font.lfFaceName,"Segoe UI");
	CFONT_OBJ->CreateFontObject(&font, cFont::FONT0);

lfHeight and lfWidth as you may have figured out are font height and width.
lfWeight is font weight or boldness. Default is FW_DONTCARE but I changed mine to FW_NORMAL.
lfItalic, lfUnderline and lfStrikeOut are obvious.
lfCharSet now this is somewhat important. If you know what charset is skip this part. If not then leave it as is which is GB2312_CHARSET
lfQuality is nice option since with it you can set AA or clear font. You can change this option and see which one you like the best.
lstrcpy(font.lfFaceName,"Segoe UI"); and last we set the font face name, which in my setup is "SEGOE UI".

From here you can play with other presets and let us know what preset is used for.

Few notes:
  • Edit this on your own rist
  • You should be able to load multiple fonts using following but with your font file name
    Code:
    AddFontResourceEx( "./Data/Interface/Windows/segoeui.ttf", FR_PRIVATE, 0 );
 
Newbie Spellweaver
Joined
Dec 16, 2013
Messages
98
Reaction score
7
if dont change the source for font, i want change the exe file, how to do?
 
Back
Top