Choose font for non-english letters

G

Guest

In my Applet I try to paint text with greek characters but characters appear as boxes.
What I can do to write non-english characters? (Chinese, Greek, Arabian, ...)
I retrieve text from *.properties files.
Can *.properties files be in unicode format?
 
H

Harald Hein

In my Applet I try to paint text with greek characters but
characters appear as boxes.

This can always happen if you rely on the fonts installed on the client
site. If there is a god chance that your users do have an appropriate
font, you can try to use that in your applet. If it is not likely that
your users have the specific font, you should consider licensing and
bundling an appropriate font with your applet. Java contains a TrueType
font renderere, and since Java 1.4 loading the font data from a
resource (a URL pointing to your jar on your server) even works.
What I can do to write non-english
characters? (Chinese, Greek, Arabian, ...) I retrieve text from
*.properties files. Can *.properties files be in unicode format?

Yes and no. Properties files have to be encoded in ISO Latin 1 (read
the API documentation of java.utilProperties). But you can specify all
Unicode characters using an escape mechanism \u<xharacter code>. The
SDK also contains a converter to convert a text file in a non Latin 1
encoding to the encoding required by properties files, includig the
generation of these escape codes. Read the documentation of your SDK.
 
R

Roedy Green

If it is not likely that
your users have the specific font, you should consider licensing and
bundling an appropriate font with your applet.

What do you do to get the right to bundle a font with an Applet?

Does this have to be negotiated with the font company, or are there
now some ways you can buy fonts that come automatically with this
right or some royalty system?
 
H

Harald Hein

Roedy Green said:
What do you do to get the right to bundle a font with an Applet?

Does this have to be negotiated with the font company, or are there
now some ways you can buy fonts that come automatically with this
right or some royalty system?

All the big companies have licenses for re-distribution, but you don't
negociate with the big guys, they negociate with you :)

You e.g. go here and let Agfa negociate with you:

http://www.fonts.com/embedding

Or you let ITC negociate with you (note the similarities of the web
pages):

http://www.itcfonts.com/about/embedding.asp

For Linotype fonts you got to

http://www.fontexplorer.com

For Bitstream fonts you go to

http://www.myfonts.com/ or http://www.bitstream.com/

For Bigelow & Holmes fonts you got to

http://www.yandy.com/

Or you try some budget company like

http://www.softmaker.de/fontliz_en.htm

(I have no experience with them)

There are many more font foundries out there, some habe dubious font
qualities, some just sell stolen typefaces, so be careful. But there
are also genue freeware and shareware foundries out there that might
have what you need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top