Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (488)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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  
  katakana + unicode  (Read 2436 times)
0 Members and 1 Guest are viewing this topic.
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Posted 2004-01-15 09:49:50 »

Accordingly to http://www.chedong.com/tech/hello_unicode.html and other sources Katakana has the unicode range of \u30A0 - \u30FF.

However... I just get squares (missing characters)... but I thought that Java uses quite complete unicode fonts by default.

I even installed japanese fonts for my system and my browser (firebird) displays em correctly now. But it still doesn't work with Java.

So... is there something I'd forgotten? (eg do I have to use another font than Swing's default font?)

弾幕 ☆ @mahonnaiseblog
Offline pepijnve

Junior Member




Java games rock!


« Reply #1 - Posted 2004-01-15 10:50:11 »

I think the default font that is used is for most components is 'dialog', which maps to Arial in windows. The Arial I have on my system only contains Latin, Greek and Arabic characters. No Japanese ones. So like you already mentioned, I think you will need to use another font than the default one.
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #2 - Posted 2004-01-16 04:52:00 »

Thanks for your reply pepijnve Smiley

But I still hadn't figured out what I have to do...

So if anyone has some hints or ideas please let me know.

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2004-01-16 06:45:18 »

You just have to get yourself a ttf font that actually has the glyphs in it.

Cas Smiley

Offline pepijnve

Junior Member




Java games rock!


« Reply #4 - Posted 2004-01-16 07:39:19 »

http://www.alanwood.net/unicode/fonts.html
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #5 - Posted 2004-01-16 08:21:19 »

Thanks pepijnve and cas Smiley

Kinda works...

Font font=new Font("MS Gothic",Font.PLAIN,12);
String testStr=new String("\u30A1\u30A2\u30A3");
JLabel testLab=new JLabel(testStr);
testLab.setFont(font);

Well... *I* have that font, but it's absolutly useless if it doesn't work out of the box :-/

弾幕 ☆ @mahonnaiseblog
Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2004-01-16 09:29:57 »

It's purely an operating system problem, not a Java problem. If the OS isn't localized for Japanese then you can hardly expect it to be able to render Japanese characters. (Which, on a related note, would get you the appropriate fonts - go to a Japanese site and IE prompts you whether you want to install the Japanese language support).

Cas Smiley

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #7 - Posted 2004-01-16 11:43:17 »

I don't fully agree with you this time, cas.

What's the meaning of having that unicode/i18n stuff if we can't use it (to it's full extend)?

The JRE is shipped with a bunch of fonts... why don't they include some with more glyphs?

Dunno... that makes me really angry. I thought that Java is a bit more open minded in that area. Why do we have unicode anyways? ASCII is good enough for english :-/

Sorry for ranting, but it's so brainless and stupid that I even got a headache. It's as stupid as the region code stuff of DVDs... I really hate artificial language barriers.

弾幕 ☆ @mahonnaiseblog
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #8 - Posted 2004-01-16 11:55:42 »

afaik, java uses the OS installed fonts... - no fonts of it own (except a Lucide<type> font).

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #9 - Posted 2004-01-16 12:30:03 »

Quote
afaik, java uses the OS installed fonts... - no fonts of it own (except a Lucide<type> font).


/jre/lib/fonts

LucidaBrightDemiBold.ttf
LucidaBrightDemiItalic.ttf
LucidaBrightItalic.ttf
LucidaBrightRegular.ttf
LucidaSansDemiBold.ttf
LucidaSansRegular.ttf
LucidaTypewriterBold.ttf
LucidaTypewriterRegular.ttf

Having a kinda complete font instead of those would make more sense.

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #10 - Posted 2004-01-16 13:45:53 »

And who's going to pay for the fonts? - they're not free you know...

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #11 - Posted 2004-01-16 14:56:53 »

Just a wild guess, but maybe you could install a font at runtime? For examply by copying a font file in your font directory (you can get the runtime installation directoy using System.getProperty("java.home")).
Maybe there's more to it than that or not even possible at all, but worth a try I guess.

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #12 - Posted 2004-01-16 22:58:27 »

Quote
And who's going to pay for the fonts? - they're not free you know...


Ofcorse I know. But we are talking about a big company wich has a *slightly* bigger budget as everyone here...

And there is also a japanese version of the SDK
http://java.sun.com/j2se/1.4.2/ja/download.html

So most likely they already own (licensed) such a font.

@erikd

Thanks for the idea, but I can't do that. I can't pay a font and it would add to much to the download size.

---

Ah well... maybe with 1.5... I mean... it's all there (basically) and it could be worse (as in python), but it's just a one-way-road right now.

Images for text stuff... oh that feels so great Tongue

弾幕 ☆ @mahonnaiseblog
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.

TehJavaDev (17 views)
2014-08-28 18:26:30

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

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

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

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

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

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

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

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

BurntPizza (36 views)
2014-08-08 02:01:56
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!