Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Adding a true type font  (Read 7294 times)

0 Members and 1 Guest are viewing this topic.

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Adding a true type font
« on: November 27, 2008, 05:40:56 AM »

Have been playing around with adding true type fonts.  There are some instructions in Inside A Game in the online documentation under localization. 

But when I am in the "fonts" file and right click Add Font and choose TrueType for the template, somehow nothing happens.

So I tried copying one of the font files to another directory and then replacing the contents with the truetype font definition from Inside A Game and editing the contents for my new font, for example, rockwell.  I get the right font but----all the true type fonts I add are red---I tried changing the parameters to rgb black parameters but they are still red. The red effect is sometimes very cool.  :  )  But I'd like to have more variety.  : )  What am I doing wrong?

 
« Last Edit: November 27, 2008, 05:50:04 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Iranicus

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 45
  • .. something is wrong ..
    • View Profile
Re: Adding a true type font
« Reply #1 on: November 27, 2008, 09:18:26 AM »

Have been playing around with adding true type fonts.  There are some instructions in Inside A Game in the online documentation under localization. 

But when I am in the "fonts" file and right click Add Font and choose TrueType for the template, somehow nothing happens.

So I tried copying one of the font files to another directory and then replacing the contents with the truetype font definition from Inside A Game and editing the contents for my new font, for example, rockwell.  I get the right font but----all the true type fonts I add are red---I tried changing the parameters to rgb black parameters but they are still red. The red effect is sometimes very cool.  :  )  But I'd like to have more variety.  : )  What am I doing wrong?

 

Which layer did you try to change? If you want to change a whole color of a font, you have to change RGB in the lastest layer. It will be work.
Logged
Where is the will, there is the way.

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Adding a true type font
« Reply #2 on: November 27, 2008, 03:52:55 PM »

As fair as I know, the font file must be copied to the asset folder of your game.
Logged
... delete the inner sleep ...

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Adding a true type font
« Reply #3 on: November 27, 2008, 03:55:26 PM »

not if you're using the font contained in Windows.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Adding a true type font
« Reply #4 on: November 27, 2008, 04:29:41 PM »

I'm using Windows ttf fonts.  This is my script:

TTFONT
{
  SIZE = 18  
  FACE = "Arial"
  FILENAME = "fonts\arial.ttf"

  BOLD = TRUE
  ITALIC = FALSE
  UNDERLINE = FALSE
  STRIKE = FALSE

  CHARSET = 1

  COLOR { 0, 0, 255 }
  ALPHA = 255
  
  LAYER
  {
    OFFSET_X = 1
    OFFSET_Y = 1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = -1
    OFFSET_Y = -1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = -1
    OFFSET_Y = 1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = 1
    OFFSET_Y = -1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }


  LAYER
  {
    OFFSET_X = 0
    OFFSET_Y = 0
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }
}
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Adding a true type font
« Reply #5 on: November 27, 2008, 04:55:51 PM »

This is what you need to change:

TTFONT
{
  SIZE = 18  
  FACE = "Arial"
  FILENAME = "fonts\arial.ttf"

  BOLD = TRUE
  ITALIC = FALSE
  UNDERLINE = FALSE
  STRIKE = FALSE

  CHARSET = 1

  COLOR { 0, 0, 255 }
  ALPHA = 255
  
  LAYER
  {
    OFFSET_X = 1
    OFFSET_Y = 1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = -1
    OFFSET_Y = -1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = -1
    OFFSET_Y = 1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = 1
    OFFSET_Y = -1
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }


  LAYER
  {
    OFFSET_X = 0
    OFFSET_Y = 0
    COLOR { 0, 0, 225 }
    ALPHA = 255
  }
}

« Last Edit: November 27, 2008, 04:59:42 PM by Mnemonic »
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Adding a true type font
« Reply #6 on: November 28, 2008, 03:04:25 AM »

Of course, it works!  Thank you!
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Adding a true type font
« Reply #7 on: November 28, 2008, 09:52:02 AM »

Hö?
I don't see any difference ... and UltraEdit doesn't, too ... are we blind?!?
Logged
... delete the inner sleep ...

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Adding a true type font
« Reply #8 on: November 28, 2008, 10:13:50 AM »

@sychron

Mnemonic just highlighted the line Catacomber must change for the font color. He didn't change the line itself.
Logged
fl*p

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Adding a true type font
« Reply #9 on: November 28, 2008, 10:17:31 AM »

ah.
Logged
... delete the inner sleep ...

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Adding a true type font
« Reply #10 on: November 28, 2008, 04:44:44 PM »

Yes, I had to change the line that Mnemonic highlighted and that gave me a beautiful black font with blue shadows.

Now, experimenting with different shadows and different colors.
This is my new script for a totally black font without shadow---You can find the rgb values for the different colors if you google rgb value.  : )

If you're using a Windows TTF you don't have to copy the font into your font folder--wme finds it itself via the path in the script.  If you import a ttf that isn't in windows then if you distribute your game you must include the font. 

I'm just playing right now. :  )  Then will play with the bmp fonts.   It's easier to experiment with the ttf fonts as the bmp fonts you have to "make" and then do the right script.  I haven't mastered that yet. Working on it.  : )

TTFONT
{
  SIZE = 18 
  FACE = "Arial"
  FILENAME = "fonts\arial.ttf"

  BOLD = TRUE
  ITALIC = FALSE
  UNDERLINE = FALSE
  STRIKE = FALSE

  CHARSET = 1

  COLOR { 0, 0, 0 }
  ALPHA = 255
 
  LAYER
  {
    OFFSET_X = 1
    OFFSET_Y = 1
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = -1
    OFFSET_Y = -1
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = -1
    OFFSET_Y = 1
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }

  LAYER
  {
    OFFSET_X = 1
    OFFSET_Y = -1
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }


  LAYER
  {
    OFFSET_X = 0
    OFFSET_Y = 0
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }
}
« Last Edit: November 28, 2008, 04:49:05 PM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Adding a true type font
« Reply #11 on: December 01, 2008, 05:43:11 AM »

BTW, there's a simpler script if you don't want shadows on your font but shadows on your font make it easier to read under certain circumstances---check out the online documentation:

" ----- if you don't want an outline/shadow, all you need is this (for example for a red font):
  COLOR { 225, 0, 0 }
  ALPHA = 255"

//Comment by me: COLOR = the rgb values:  red 225, green 0, blue 0--this means your font is going to be very red  : )
//ALPHA is whether you want the print to be visible or not so visible

; ----- otherwise if you want cool shadows on your font you need to define "layers" of the font (see the docs for details)  and my last post.  :) 

While most of you probably know all this, my post is for those who might not--there was a time when I didn't have a clue as to what rgb was or how to manipulate it but it can give some really nice effects and it's really simple if you know what the values are for any color --   : )

So you can take any Windows font and do some really interesting stuff with it.  :  )
« Last Edit: December 01, 2008, 06:04:05 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Adding a true type font
« Reply #12 on: December 19, 2008, 05:13:20 AM »

I have a trivial, but important to me, question.

The way you refer to the path of a ttf font in Windows is f.e.:

FILENAME = "fonts\arial.ttf"

but very often fonts have expansive names containing spaces-- f.e. Lunchtime Doubly So Regular

how do you refer to the path to those fonts--

FILENAME = "fonts\Lunchtime_Doubly_So_Regular.ttf"

or

FILENAME = "fonts\LunchtimeDoublySoRegular.ttf"

or

something else?

when I want to make a new font and it has a name with spaces between the words for some reason it doesn't work out that well.

--mystified  : )   

My fonts are very important to me so this is something I would like to solve.  :  )  Probably no one loves fonts as much as I do.  :  )

« Last Edit: December 20, 2008, 04:56:21 AM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Adding a true type font
« Reply #13 on: December 20, 2008, 10:32:15 AM »

Filenames containing spaces only need to be enclosed in quotes. That's all you need to do.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Adding a true type font
« Reply #14 on: December 20, 2008, 06:10:09 PM »

Thanks, Mnemonic.
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  
 

Page created in 0.05 seconds with 25 queries.