Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • -1

Add new font to Client



Version of Files XXX



I wanna add a new font (.ttf) to my client.

I've tried to use "AddFontResourceEx()"(Binary) and on root "fontname":"xxx"

But it does not work =(
Maybe somebody already have done this and can give me a useful hint.




Link to post

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

Metin2 can support different fonts, you just have to call SetFontName("(Font name):(size)") and it will do the job of loading the font for you.

The way the client loads fonts it's oddly complex, but the fonts are loaded as long the first time that the client requires it and then cache em.

The client looks for (font name).fnt, ".fnt" is an internal extension used for identify what font to load (they do not exist in any EterPack nor they actually should unless you really want to)

After all the class complex structure, we finally know that CGraphicText is the one responsable for texts and CGraphicFontTexture is the one who loads the texture.

CGraphicText::OnLoad is called and it creates our FontTexture, specifically it calls CGraphicFontTexture::Craete


From this function, we understand that GDI+ is being used to load fonts (sigh),

the responsable in font creation is  CGraphicFontTexture::GetFont(WORD codePage).


The simpliest solution I can think of is having your users to install the font you'd like to and call SetFontName (Python).

If you really want to load TTF, you actually have to load somewhere your font somewhere by using AddFontMemResourceEx. This would also help you packing your font in EterPacks.

Once the font is loaded, you would have to store the HANDLE inside "m_fontMap"

Metin2 will take care of freeing the memory for you and load the font once it's cached. GDI can load TTF so that's not an issue.



Oh, he's asking about ADDING a new font not changing it.

Edited by arves100 (see edit history)


Link to post

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...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.