Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  custom font  (Read 1599 times)
0 Members and 1 Guest are viewing this topic.
Offline vincenzo.maltese

Senior Newbie


Medals: 1



« Posted 2012-07-27 13:05:39 »

Hi guy,

how can i create font color 80's style? i found "namco.ttf" but the color is one, instead I want to create colored fonts.

Thanks  Smiley Smiley Smiley
Offline _Al3x

Senior Member


Medals: 7


Indie Games FTW!


« Reply #1 - Posted 2012-07-27 13:08:52 »

Use paint Smiley

I would suggest you give a little more info about what are you trying to do, with what tools... If not, your question is a little vague Sad

Offline davidllanos22

Junior Member


Projects: 2


I'm just a learner!


« Reply #2 - Posted 2012-07-27 13:17:10 »

Change the color with code D:

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ReBirth
« Reply #3 - Posted 2012-07-27 13:36:34 »

Change the color with code D:
So hardcore!

Offline Sickan

Senior Member


Medals: 9



« Reply #4 - Posted 2012-07-27 15:33:28 »

He can't hardcode it, so he needs to store the color to use in a TXT document. Or so I've heard.
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #5 - Posted 2012-07-27 21:14:18 »

No, you have to create your own Font class and draw an image for every different character! Think OOP guys!
Offline ReBirth
« Reply #6 - Posted 2012-07-28 11:09:09 »

No, you have to create your own Font class and draw an image for every different character! Think OOP guys!
And he has to draw/code for every character change? just make it easy, grab a freefont out there and load it persecutioncomplex

Offline vincenzo.maltese

Senior Newbie


Medals: 1



« Reply #7 - Posted 2012-07-30 10:18:52 »

In my game would include custom font like this

http://www.google.it/imgres?um=1&hl=it&sa=N&biw=1440&bih=770&tbm=isch&tbnid=JAa5NjI9FvS4-M:&imgrefurl=http://blogs.sega.com/2012/05/03/more-sega-classics-for-virtual-console/&docid=rYVJOlZ0UvDhOM&imgurl=http://farm9.staticflickr.com/8145/7140153385_a49d7b4103.jpg&w=500&h=350&ei=SF8WUPPhJK2N4gTtm4GQDw&zoom=1&iact=hc&vpx=670&vpy=149&dur=369&hovh=188&hovw=268&tx=165&ty=101&sig=112535774372889635011&page=1&tbnh=118&tbnw=168&start=0&ndsp=28&ved=1t:429,r:3,s:0,i:81

be noted black border around the characters for example
Offline Ultroman

JGO Knight


Medals: 25
Projects: 1


Snappin' at snizzes since '83


« Reply #8 - Posted 2012-07-30 22:48:40 »

Hi guy
I'm not your guy, friend!

- Jonas
Offline atombrot

Senior Member


Medals: 10
Projects: 1



« Reply #9 - Posted 2012-07-31 07:46:20 »

Usually you have the font present in one color, that is blended into another one when needed. I don't know what tool set you use, so I cannot give you direct advice on how you can do it. Generally your font renderer (or loader) takes care of the font color.

Slick2d for example has two classes (AngelcodeFont and UnicodeFont) to handle font rendering. AngelcodeFont works with a pregenerated image and definition file (generated with a tool like hiero or the TWL font creator). UnicodeFont does basically the same, but it takes a *.ttf file as input and the images for the glyphs are generated directly in memory (so UnicodeFont takes a bit longer to load). Basically you instantiate a version of the font. Version in this context means that you apply settings like color, style (bold or italic), a font size etc. For each font and font style, you can keep an instance.

I think you can apply an outline effect with the unicode font. On the font class, you have a method "getEffects" to retrieve the active effects (at least I think thats what it does).  => http://slick.cokeandcode.com/javadoc/org/newdawn/slick/UnicodeFont.html

There you can add a new OutlineEffect => http://slick.cokeandcode.com/javadoc/org/newdawn/slick/font/effects/OutlineEffect.html

If you wan't to have a better (or more suitable) explanation, you would have to provide more infos about what you work with (java2d, lwjgl, slick, jogl etc.)



I'm not your friend, buddy!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ultroman

JGO Knight


Medals: 25
Projects: 1


Snappin' at snizzes since '83


« Reply #10 - Posted 2012-07-31 12:39:35 »

I'm not your buddy, guy!

Nice answer, though. I need to look into that AngelFont thing. People say it's weird, so I might just code my own basic version of it

- Jonas
Offline Ultroman

JGO Knight


Medals: 25
Projects: 1


Snappin' at snizzes since '83


« Reply #11 - Posted 2012-07-31 12:50:59 »

f**k you, ok?
You serious? It's a well-known South Park joke. Since you wrote "Hi guy" I thought you were familiar with it. I meant no harm

- Jonas
Offline vincenzo.maltese

Senior Newbie


Medals: 1



« Reply #12 - Posted 2012-07-31 12:54:51 »

i think fool me.Sorry, I meant no harm
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (13 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!