Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / April 2006

Tip: Looking for answers? Try searching our database.

using non-standard fonts

Thread view: 
Kova - 27 Apr 2006 13:12 GMT
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
Thomas Weidenfeller - 27 Apr 2006 13:38 GMT
> 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/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.