Hello.
I can't get my fonts to work with Java. All other (non-java)
applications can display it, but when I load it and display it I get
bunch of boxes. I've even tried createFont method and loaded it directly
from a file, same result. Can anybody tell me how this is done? Thank you.
--
Kova
> I can't get my fonts to work with Java. All other (non-java)
> applications can display it, but when I load it and display it I get
> bunch of boxes. I've even tried createFont method and loaded it directly
> from a file, same result. Can anybody tell me how this is done? Thank you.
(1) Your font must be a TrueType font, or (since 1.5) a Adobe Type 1
font (Sun is babbling about OpenType, too).
(2) Your font must contain a Unicode glyphe map.
If any of these preconditions is not met, you are in serious trouble.
Your only hope is then to either use some font tool to convert your
font, or to try to reconfigure your VM to use your font instead of some
standard font by messing with the font configuration of the VM:
http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Kova - 27 Apr 2006 16:26 GMT
> (1) Your font must be a TrueType font, or (since 1.5) a Adobe Type 1
> font (Sun is babbling about OpenType, too).
>
> (2) Your font must contain a Unicode glyphe map.
it's TrueType font (.ttf file). So it dosen't support unicode...
wonderfull. It's still stupid that it can't render stuff that it has,
like normal ASCII letters and display boxes for stuff that is missing :(
I'll try to find some converter. Tnx.
--
Kova
Roedy Green - 27 Apr 2006 19:34 GMT
On Thu, 27 Apr 2006 14:38:44 +0200, Thomas Weidenfeller
<nobody@ericsson.invalid> wrote, quoted or indirectly quoted someone
who said :
>(1) Your font must be a TrueType font, or (since 1.5) a Adobe Type 1
>font (Sun is babbling about OpenType, too).
I thought sun could handle opentype so long as it was TrueType inside.
Is that incorrect?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Thomas Weidenfeller - 28 Apr 2006 09:20 GMT
> I thought sun could handle opentype so long as it was TrueType inside.
> Is that incorrect?
I have never heard of anyone who got that working.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/