Author Topic: Problems with changing default font  (Read 1612 times)

MKR

  • Guest
Problems with changing default font
« on: 16 August 2011, 14:01:05 »
Good day to all! Sorry for machine translation - its Google Translate, and i don't know English perfectly.

I have a big problem with custom fonts (Win7 32bit). In GAE that was simple - just replace the font in your fonts folder, and everything will be fine.

To begin with, working with fonts operation is not documented in the wiki (MG / INI page), and therefore i do not understand, what to do with the values of prefix, postfix, and what they mean.

The problem: I want to replace the standard font (Times New Roman?) To the font "Archangelsk" to support Russian characters and better look. FONT_TYPENAME parameter did not change anything, which I have not popped - in the language file in glest.ini, glestuser.ini and so on.
I had to download the source code and Visual Studio, to understand how it works (I should note that I am not a C+ programmer). After 5.5 hours of downloading win32_deps, and everything else (3G-Internet), and [much] attempts to compile the game, but I still did it.

Then I discovered that in shared_lib\sources\graphics\font.cpp there are an "emergency" version of the font. Without thinking, I've replaced it with Archangelsk (font is existing in the windows / fonts folder).  I build the game - there is Times New Roman.

I started to dig deeper - and replaced everything in win32_deps that is related to Times New Roman with the HEX-editor to my font.

Building libglest, the game - and again Times New Roman!

No nerves. How do I replace the font in the game?

Thanks in advance, and greetings from Russia  :)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Problems with changing default font
« Reply #1 on: 16 August 2011, 14:52:13 »
Hi what version of MegaGlest do you use? 3.2.2 or svn version?

I am asking because we are currently working on utf8 support, so these kind of problems will hopefully be gone soon!
Our current alpha already supports this new font system. In the new system the used font can be specified in the language file. ( look at the current deutsch.lng file )
(
Here is a binary, but you will need the updated data too:

binary from here:  https://forum.megaglest.org/index.php?topic=7411.msg75908#msg75908
data from here: http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/data/?view=tar
)

Best is to checkout svn and try from there

---------------------------------------
If you talk about the 3.2.2 version of the game, I think the effort is quite useless at the moment....

 

If you have more questions try to ask on irc here:  irc://irc.freenode.net/glest   or via webchat here: http://webchat.freenode.net/?channels=glest
But the developers( me and softcoder ) are a bit busy at the moment and not there too often ....
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

MKR

  • Guest
Re: Problems with changing default font
« Reply #2 on: 16 August 2011, 15:39:16 »
I am glad that I communicate directly with the developer, thanks!

I am using 3.5.2.2_i386 version  - svn version (Х.ХХalpha, sorry - don't remember) seemed unstable on my PC and and often takes me on desktop, than i decided to revert to 3.5.2, because it is muuuch more stable.

One another question:
this topic https://forum.megaglest.org/index.php?topic=7398.0 is about alpha version, right?

So okay, i try to build (downloading binaries takes more time with my terrible internet) new source from svn, and write about results.

If you have more questions try to ask on irc

I have never used IRC, but I'll try to see what it is  :)

Oh, i almost forget. According to the source code, in GAE the interface is made through a widgets, and you have (in my opinion) render text by the usual method? I would like to make text and graphics size larger, as in GAE. Is it possible in new svn version?
And yes, I like the loading screen in GAE :) It is possible to do something like that?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Problems with changing default font
« Reply #3 on: 16 August 2011, 15:46:08 »

I have never used IRC, but I'll try to see what it is  :)
its a chat program
Quote
Oh, i almost forget. According to the source code, in GAE the interface is made through a widgets, and you have (in my opinion) render text by the usual method? I would like to make text and graphics size larger, as in GAE. Is it possible in new svn version?
I don't know what exactly is done in GAE. In Megaglest you can make the text/font bigger in the ingame options.....
Quote
And yes, I like the loading screen in GAE :) It is possible to do something like that?
As I said I don't know GAE very well. What is so different from our loading screen?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

MKR

  • Guest
Re: Problems with changing default font
« Reply #4 on: 16 August 2011, 16:21:23 »
Okay, i will show by examples.

In Megaglest you can make font bigger, but not image (or am I wrong?).

Comparisons:

Do not pay attention to the changed theme. Larger images will more suitable for monitors with a high resolution

And GAE loading screen:



It has gradient progress bar and gradient "dissapearing text" which are looks good.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Problems with changing default font
« Reply #5 on: 16 August 2011, 19:43:53 »
Firstly, what he refers to with the text is how MG can only resize the text, but GAE can also resize the buttons that the text is on, so that text doesn't become ugly, overlapping, etc.

Secondly, GAE added the loading bar and reverted to earlier versions of Glest's loading screen, as players universally preferred that (Glest 3.1.2 and earlier had it, I believe).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MKR

  • Guest
Re: Problems with changing default font
« Reply #6 on: 16 August 2011, 21:43:15 »
Firstly, what he refers to with the text is how MG can only resize the text

SVN - version too?

And what means the lines "prefix", "postfix", etc?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Problems with changing default font
« Reply #7 on: 17 August 2011, 11:28:06 »
referring to the buttons:
No you cannot make the buttons bigger in MG.
But you can customize your own Layout for every menu.

Loading screen:
In short: We like it the way it is now, and we don't like it the old way  :D . The loading screen is individual for each techtree and so on and the display is quite nice.

prefix and postfix are used for the old font system. A full font description is made of the prefix+fontname+postfix.
To make it more easy to change just the font name we used this prefix/postfix thing...
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

MKR

  • Guest
Re: Problems with changing default font
« Reply #8 on: 17 August 2011, 18:35:56 »
Quote
But you can customize your own Layout for every menu.
In svn version? Is this documented feature? Any examples, please!
Quote
The loading screen is individual for each techtree and so on and the display is quite nice.
I agree, but numbers and percent symbols are out of progress-bar, In my opinion it doesn't look good...
Code: [Select]
[img]http://img215.imageshack.us/img215/288/86861814.jpg[/img]Yes, i saw this in code...
Quote
To make it more easy to change just the font name we used this prefix/postfix thing...
So... full font change is avaible in old (3.5.2) version?! I don't mean changing it depending on the language file, I want to replace it completely.
If it possible, can you give me short instruction how to do this? I've tried everything I could, but with lo luck.
« Last Edit: 7 October 2016, 21:38:38 by filux »

 

anything