Discussion:
Web Form: Other Question: Java Tool
Magda Danish (Unicode)
2003-09-19 21:13:08 UTC
Permalink
Anne,

I am forwarding your email to the Unicode Public Email list
http://www.unicode.org/consortium/distlist.html.
I hope someone will be able to answer your question.

Regards,

Magda Danish
Administrative Director
The Unicode Consortium
650-693-3921
-----Original Message-----
Date/Time: Fri Sep 19 05:38:35 EDT 2003
Report Type: Other Question, Problem, or Feedback
Dear Unicode-Team,
my name is Anne Gleitsmann. My task is to implement a tool in
java that administers different Ressource-Bundles. In my tool
you can choose a master-document and one or more
slave-documents, then follows the data-comparision. The
document is being displayed in JTables.
Now the language-variety has been expanded to include
Japanese and Korean - and that is where my problem is: the
font of these languages is shown as little squares.
I found the information in the internet that I need to add
the range of those characters to the font.properties file -
but how do I do this? Could you help me or give me advise as
to how to do this?
Thank you!
Greetings from Germany!
Sincerely
Anne Gleitsmann
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
(End of Report)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
KnowledgeStorm has over 22,000 B2B technology solutions. The most comprehensive IT buyers' information available. Research, compare, decide. E-Commerce | Application Dev | Accounting-Finance | Healthcare | Project Mgt | Sales-Marketing | More
http://us.click.yahoo.com/IMai8D/UYQGAA/cIoLAA/8FfwlB/TM
---------------------------------------------------------------------~->

To Unsubscribe, send a blank message to: unicode-***@yahooGroups.com

This mailing list is just an archive. The instructions to join the true Unicode List are on http://www.unicode.org/unicode/consortium/distlist.html


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Philippe Verdy
2003-09-19 22:42:43 UTC
Permalink
Looks like it is not the appropriate list to discuss about Java
installation
for multi-languages applications.

It's true that the default installation of Java provides a set of
"font.properties" files which are customized and chosen at run-time
trying to match only the current user locale, and not other locales.

It is however possible to recombine all these font.properties files into
a single one containing all the required fonts to support more languages
than the current family of languages for which a default set of fonts is
specified.

I did it myself, but this is done manually: there's no API in Java to
customize the set of fonts to use in a Java application: either you
use the Java "logical" fonts, which are bound by default to a system-
and locale-dependant set of fonts working for a subset of Unicode, or
your Java application can specify the real font names to use to
display something. Shamely, there's currently no API in Java (Java2D?
AWT?) to build a logical font from a set of fonts.

I know that Sun is working on a new API that will deprecate the
use of "font.properties" files. It is expected that the first version
of Java to implement this API will also be provided with a new
resource format used instead of the badly documented (and officially
not supported!) font.properties format, and will be accessible from
applications or within a standard Java control panel to add new
font mappings to logical fonts (like "Dialog"), and choose the prefered
fonts to look for for some scripts (or Unicode ranges).

For now the "font.properties" files are specific for each hosting
platform onto which Java was ported. That's the most probable
reason why it is so badly documented (because it is not officially
part of the Java2 API, allowing other Java vendors to implement
other solutions to map system fonts to usable Java fonts).

I can't remember the URL where Sun discussed this with the Java
community, but I'm sure you'll find this discussion within the Java
Developers Forums and in the JCP, where several proposals to enhance
Java2D, AWT, Swing and java.text for easier interoperability.

Philippe.

----- Original Message -----
From: "Magda Danish (Unicode)" <v-***@microsoft.com>
To: <***@unicode.org>
Cc: <***@lhsystems.com>
Sent: Friday, September 19, 2003 11:13 PM
Subject: FW: Web Form: Other Question: Java Tool
Post by Magda Danish (Unicode)
Anne,
I am forwarding your email to the Unicode Public Email list
http://www.unicode.org/consortium/distlist.html.
I hope someone will be able to answer your question.
Regards,
Magda Danish
Administrative Director
The Unicode Consortium
650-693-3921
-----Original Message-----
Date/Time: Fri Sep 19 05:38:35 EDT 2003
Report Type: Other Question, Problem, or Feedback
Dear Unicode-Team,
my name is Anne Gleitsmann. My task is to implement a tool in
java that administers different Ressource-Bundles. In my tool
you can choose a master-document and one or more
slave-documents, then follows the data-comparision. The
document is being displayed in JTables.
Now the language-variety has been expanded to include
Japanese and Korean - and that is where my problem is: the
font of these languages is shown as little squares.
I found the information in the internet that I need to add
the range of those characters to the font.properties file -
but how do I do this? Could you help me or give me advise as
to how to do this?
Thank you!
Greetings from Germany!
Sincerely
Anne Gleitsmann
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
(End of Report)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
KnowledgeStorm has over 22,000 B2B technology solutions. The most comprehensive IT buyers' information available. Research, compare, decide. E-Commerce | Application Dev | Accounting-Finance | Healthcare | Project Mgt | Sales-Marketing | More
http://us.click.yahoo.com/IMai8D/UYQGAA/cIoLAA/8FfwlB/TM
---------------------------------------------------------------------~->

To Unsubscribe, send a blank message to: unicode-***@yahooGroups.com

This mailing list is just an archive. The instructions to join the true Unicode List are on http://www.unicode.org/unicode/consortium/distlist.html


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Addison Phillips [wM]
2003-09-19 23:33:20 UTC
Permalink
Hi Anne,

This is a common problem, which has a solution on two different levels. The
problem you have would be more succinctly phrased as "Java knows what the
characters are, but doesn't have a picture of each character to show you.
You need to supply the 'picture'."

You have the right solution, which involves the font.properties file.

First there is the problem of what you do when developing the product (so
you can see that it is working correctly). If you are working on Windows and
own a copy of MS-Office, the easiest thing to do is install the font "Arial
Unicode MS" and modify your font.properties file appropriately (there are
other such fonts in the world... I'm sure you can find them if you look, but
this one is common to have). From that point on you'll be able to see the
characters in your JTable.

Secondly is what you do for your end users. You'll have to provide the end
users with instructions about how to identify appropriate fonts and install
them into their font.properties files.

Here's how you modify your font.properties. For each logical font "block",
you can add the additional font(s) like this:

dialog.0=Arial,ANSI_CHARSET
dialog.1=WingDings,SYMBOL_CHARSET
dialog.2=Symbol,SYMBOL_CHARSET
dialog.3=MS PMincho,SJIS_CHARSET # example of Japanese font
dialog.4=Arial Unicode MS #Note the spaces!


Then you need to add a reference to the font's disk name, like this:

# Font File Names
#
filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF
filename.Arial_Unicode_MS=ARIALUNI.TTF # Note the underscores here!
filename.MS_PMincho=MSMINCHO.TTF

For some fonts (but not Arial Unicode) you must modify the font converters
and exclusion ranges:

# Component Font Character Encodings
#
fontcharset.dialog.0=sun.io.CharToByteCp1252
fontcharset.dialog.1=sun.awt.windows.CharToByteWingDings
fontcharset.dialog.2=sun.awt.CharToByteSymbol
fontcharset.dialog.3=sun.io.CharToByteCp932 #Mincho is a Shift-JIS font and
requires conversion. 932 is the Japanese code page.

# Exclusion Ranges
#
exclusion.dialog.0=0500-20ab,20ad-ffff
exclusion.dialoginput.0=0500-20ab,20ad-ffff
exclusion.serif.0=0500-20ab,20ad-ffff
exclusion.sansserif.0=0500-20ab,20ad-ffff
exclusion.monospaced.0=0500-20ab,20ad-ffff

When you are done, save the file as "font.properties" in your jre/lib
directory. Now your program should work the way you expect.

A few more tips:

1. Be sure your code uses logical fonts (that is,
dialog/serif/sanserif/monospaced/etc., not
Times/Arial/Helvetica/Verdana/etc.

2. Be careful of bold and italic. Many Asian fonts do not contain a full set
of glyphs for these styles. You'll have to substitute the plain fonts in
order to see the characters, but they won't be bold or italic or
what-have-you.

Hope this helps.

Best Regards,

Addison


Addison P. Phillips
Director, Globalization Architecture
webMethods | Delivering Global Business Visibility

432 Lakeside Drive, Sunnyvale, CA, USA
+1 408.962.5487 (office) +1 408.210.3569 (mobile)
mailto:***@webmethods.com

Chair, W3C-I18N-WG, Web Services Task Force
http://www.w3.org/International/ws

Internationalization is an architecture.
It is not a feature.
-----Original Message-----
Behalf Of Magda Danish (Unicode)
Sent: Friday, September 19, 2003 2:13 PM
Subject: FW: Web Form: Other Question: Java Tool
Anne,
I am forwarding your email to the Unicode Public Email list
http://www.unicode.org/consortium/distlist.html.
I hope someone will be able to answer your question.
Regards,
Magda Danish
Administrative Director
The Unicode Consortium
650-693-3921
-----Original Message-----
Date/Time: Fri Sep 19 05:38:35 EDT 2003
Report Type: Other Question, Problem, or Feedback
Dear Unicode-Team,
my name is Anne Gleitsmann. My task is to implement a tool in
java that administers different Ressource-Bundles. In my tool
you can choose a master-document and one or more
slave-documents, then follows the data-comparision. The
document is being displayed in JTables.
Now the language-variety has been expanded to include
Japanese and Korean - and that is where my problem is: the
font of these languages is shown as little squares.
I found the information in the internet that I need to add
the range of those characters to the font.properties file -
but how do I do this? Could you help me or give me advise as
to how to do this?
Thank you!
Greetings from Germany!
Sincerely
Anne Gleitsmann
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
(End of Report)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
KnowledgeStorm has over 22,000 B2B technology solutions. The most comprehensive IT buyers' information available. Research, compare, decide. E-Commerce | Application Dev | Accounting-Finance | Healthcare | Project Mgt | Sales-Marketing | More
http://us.click.yahoo.com/IMai8D/UYQGAA/cIoLAA/8FfwlB/TM
---------------------------------------------------------------------~->

To Unsubscribe, send a blank message to: unicode-***@yahooGroups.com

This mailing list is just an archive. The instructions to join the true Unicode List are on http://www.unicode.org/unicode/consortium/distlist.html


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Xueming Shen
2003-09-20 00:10:22 UTC
Permalink
The latest "official" document about java font.properties can be found at

http://java.sun.com/j2se/1.4.2/docs/guide/intl/fontprop.html

regards,

sherman
Post by Addison Phillips [wM]
Hi Anne,
This is a common problem, which has a solution on two different levels. The
problem you have would be more succinctly phrased as "Java knows what the
characters are, but doesn't have a picture of each character to show you.
You need to supply the 'picture'."
You have the right solution, which involves the font.properties file.
First there is the problem of what you do when developing the product (so
you can see that it is working correctly). If you are working on Windows and
own a copy of MS-Office, the easiest thing to do is install the font "Arial
Unicode MS" and modify your font.properties file appropriately (there are
other such fonts in the world... I'm sure you can find them if you look, but
this one is common to have). From that point on you'll be able to see the
characters in your JTable.
Secondly is what you do for your end users. You'll have to provide the end
users with instructions about how to identify appropriate fonts and install
them into their font.properties files.
Here's how you modify your font.properties. For each logical font "block",
dialog.0=Arial,ANSI_CHARSET
dialog.1=WingDings,SYMBOL_CHARSET
dialog.2=Symbol,SYMBOL_CHARSET
dialog.3=MS PMincho,SJIS_CHARSET # example of Japanese font
dialog.4=Arial Unicode MS #Note the spaces!
# Font File Names
#
filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF
filename.Arial_Unicode_MS=ARIALUNI.TTF # Note the underscores here!
filename.MS_PMincho=MSMINCHO.TTF
For some fonts (but not Arial Unicode) you must modify the font converters
# Component Font Character Encodings
#
fontcharset.dialog.0=sun.io.CharToByteCp1252
fontcharset.dialog.1=sun.awt.windows.CharToByteWingDings
fontcharset.dialog.2=sun.awt.CharToByteSymbol
fontcharset.dialog.3=sun.io.CharToByteCp932 #Mincho is a Shift-JIS font and
requires conversion. 932 is the Japanese code page.
# Exclusion Ranges
#
exclusion.dialog.0=0500-20ab,20ad-ffff
exclusion.dialoginput.0=0500-20ab,20ad-ffff
exclusion.serif.0=0500-20ab,20ad-ffff
exclusion.sansserif.0=0500-20ab,20ad-ffff
exclusion.monospaced.0=0500-20ab,20ad-ffff
When you are done, save the file as "font.properties" in your jre/lib
directory. Now your program should work the way you expect.
1. Be sure your code uses logical fonts (that is,
dialog/serif/sanserif/monospaced/etc., not
Times/Arial/Helvetica/Verdana/etc.
2. Be careful of bold and italic. Many Asian fonts do not contain a full set
of glyphs for these styles. You'll have to substitute the plain fonts in
order to see the characters, but they won't be bold or italic or
what-have-you.
Hope this helps.
Best Regards,
Addison
Addison P. Phillips
Director, Globalization Architecture
webMethods | Delivering Global Business Visibility
432 Lakeside Drive, Sunnyvale, CA, USA
+1 408.962.5487 (office) +1 408.210.3569 (mobile)
Chair, W3C-I18N-WG, Web Services Task Force
http://www.w3.org/International/ws
Internationalization is an architecture.
It is not a feature.
-----Original Message-----
Behalf Of Magda Danish (Unicode)
Sent: Friday, September 19, 2003 2:13 PM
Subject: FW: Web Form: Other Question: Java Tool
Anne,
I am forwarding your email to the Unicode Public Email list
http://www.unicode.org/consortium/distlist.html.
I hope someone will be able to answer your question.
Regards,
Magda Danish
Administrative Director
The Unicode Consortium
650-693-3921
-----Original Message-----
Date/Time: Fri Sep 19 05:38:35 EDT 2003
Report Type: Other Question, Problem, or Feedback
Dear Unicode-Team,
my name is Anne Gleitsmann. My task is to implement a tool in
java that administers different Ressource-Bundles. In my tool
you can choose a master-document and one or more
slave-documents, then follows the data-comparision. The
document is being displayed in JTables.
Now the language-variety has been expanded to include
Japanese and Korean - and that is where my problem is: the
font of these languages is shown as little squares.
I found the information in the internet that I need to add
the range of those characters to the font.properties file -
but how do I do this? Could you help me or give me advise as
to how to do this?
Thank you!
Greetings from Germany!
Sincerely
Anne Gleitsmann
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
(End of Report)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
KnowledgeStorm has over 22,000 B2B technology solutions. The most comprehensive IT buyers' information available. Research, compare, decide. E-Commerce | Application Dev | Accounting-Finance | Healthcare | Project Mgt | Sales-Marketing | More
http://us.click.yahoo.com/IMai8D/UYQGAA/cIoLAA/8FfwlB/TM
---------------------------------------------------------------------~->

To Unsubscribe, send a blank message to: unicode-***@yahooGroups.com

This mailing list is just an archive. The instructions to join the true Unicode List are on http://www.unicode.org/unicode/consortium/distlist.html


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Continue reading on narkive:
Loading...