1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

How to scale text or change fonts?

Discussion in 'Modding Help' started by Jackard, Jun 16, 2013.

  1. Jackard

    Jackard Base Burner

    Messages:
    852
    Rayne likes this.
  2. Rayne

    Rayne ༼ つ ◕_◕ ༽つ Administrator Global Moderator Forum Moderator Tester

    Messages:
    1,916
    probably with an if statement getting the blob's tag

    if (blob.hasTag("player") ) //assuming you have blob declared
    {
    stuff about resizing font
    }

    it's just a hunch, so GL
     
  3. Jackard

    Jackard Base Burner

    Messages:
    852
    That doesn't help? How do you resize a font? Adding something like
    Code:
    guiFontTTFSize = 22
    (from gui\guiskin.cfg) only crashes the game, and DrawText doesn't have a scale parameter like DrawIcon does:
    Code:
    GUI:DrawText( string, position, color )
     
  4. Rayne

    Rayne ༼ つ ◕_◕ ༽つ Administrator Global Moderator Forum Moderator Tester

    Messages:
    1,916
    that, i have no clue on, i thought you had already figure out the resizing part, since you had a screenshot with a messed up server browser.
     
  5. Jackard

    Jackard Base Burner

    Messages:
    852
    Switching the font size in guiskin.cfg changes everything. I want to only make the flag numbers larger, and I can't find any information on how to do this.
     
  6. VanHuek

    VanHuek KAG Guard Tester

    Messages:
    751
    <06@MM> yes
    <06@MM> font size is set in guiSkin.cfg, unfortunately there's a bug and you need to chagne all font sizes, cant set just one
    <VanHuek> Ok thanks MM: I assume it is a very low priority.
    <06@MM> yeah :(
     
  7. Jackard

    Jackard Base Burner

    Messages:
    852
    That's terrible. Is there no way to introduce our own fonts?
     
  8. VanHuek

    VanHuek KAG Guard Tester

    Messages:
    751

    Obviously not, I will ask Geti if I see him on if he can do something.
     
  9. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Simple "solution" is render the numbers to image in this case. I cant do anything about this at the moment, its the way the ttf stuff is coded due to the way irrlicht handles fonts. We'll need to add a way to load your own fonts at some point but it's not going to be as trivial as it should be.
     
  10. Jackard

    Jackard Base Burner

    Messages:
    852
    I asked the CtP modders earlier how they did it and their example code was really confusing.
     
  11. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    basically you write your own font renderer :P if you post the example code I can go through it bit by bit if you're interested though, assuming their code isn't terrible or gigantic (hours in the day and all that).
     
  12. Jackard

    Jackard Base Burner

    Messages:
    852
    That does sound very :p

    I invited you to their convo