Java

Supported Fonts

The set of supported fonts varies between different implementations of the Java 2 platform. This page documents font support in Sun's Java 2 Software Development Kit, Standard Edition, v. 1.4 (J2SDK), and Java 2 Runtime Environment, Standard Edition, v. 1.4 (J2RE). For the terminology used, see the Font class description.


Support for Physical Fonts

Sun's Java 2 Runtime Environment supports TrueType and PostScript Type 1 fonts.

Physical fonts need to be installed in locations known to the Java runtime environment. Sun's Java 2 Runtime Environments look in two locations: the lib/fonts directory within the J2RE itself, and the normal font location(s) defined by the host operating system. If fonts with the same name exist in both locations, the one in the lib/fonts directory is used.

Users can add physical fonts that use a supported font technology by installing them either in the lib/fonts directory within the J2RE, or by installing them in a way supported by the host operating system (dropping them into the Fonts folder on Windows, using the pkgadd command on Solaris).


Support for Logical Fonts

Logical font names are mapped to physical fonts in implementation dependent ways. Typically one logical font name maps to several physical fonts in order to cover a large range of characters. Sun's Java 2 Runtime Environments use font.properties files to define the mapping.

Adventurous users can modify the font.properties files or create new ones. For example, users may want to add additional physical fonts to a given mapping in order to extend the set of characters supported by a logical font.


The Lucida Fonts

Sun's Java 2 Software Development Kit and Java 2 Runtime Environments bundles several physical fonts of the "Lucida" design family. These fonts are also licensed for use in other implementations of the Java 2 platform. These fonts are physical fonts, but since they come with the Java 2 runtime, they don't depend on the host operating system. Using them provides the benefit of a consistent look and feel across platforms and implementations for a large set of languages.

There are three different type families: "Lucida Sans", "Lucida Sans Typewriter", and "Lucida Bright". Each family has plain, bold, italic, and bold-italic styles. Not all of these are present in all Java 2 implementations. For example, the default download bundle of Sun's Java 2 Runtime Environment for Windows only contains the Lucida Sans plain font (but note that application developers can include all Lucida fonts with a J2RE that they redistribute with an application).

The following table shows which Unicode 3.0 character blocks are covered by each font family:

Unicode Block

Lucida Sans

Lucida Sans Typewriter

Lucida Bright

Basic Latin

yes

yes

yes

Latin-1 Supplement

yes

yes

yes

Latin Extended-A

yes

yes

yes

Latin Extended-B

partial

partial

partial

IPA Extensions

partial

no

no

Spacing Modifier Letter

partial

partial

partial

Combining Diacritical Marks

partial

no

partial

Greek

yes

yes

yes

Cyrillic

partial

partial

partial

Hebrew

yes

yes

no

Arabic

partial

partial

partial

Devanagari

yes

no

no

Thai

yes

yes

no

General Punctuation

partial

partial

partial

Superscripts and Subscripts

partial

partial

partial

Currency Symbols

partial

partial

partial

Letterlike Symbols

partial

partial

partial

Number Forms

partial

partial

no

Arrows

partial

partial

partial

Mathematical Operators

yes

partial

yes

Enclosed Alphanumerics

partial

no

no

Box Drawings

partial

partial

no

Block Elements

partial

partial

no

Geometric Shapes

partial

partial

partial

Miscellaneous Symbols

partial

partial

no

Dingbats

yes

no

no

Alphabetic Presentation Forms

partial

partial

no

Arabic Presentation Forms-A

partial

partial

partial

Arabic Presentation Forms-B

yes

yes

yes

Note that of the writing systems that are generally fully supported by Sun's Java 2 Runtime Environments, the Lucida fonts do not support Chinese (Simplified), Chinese (Traditional), Japanese, and Korean.

The fonts are installed in the Java 2 Runtime Environment's lib/fonts directory as the following files (not all of them may be present):

LucidaSansDemiBold.ttf
LucidaSansDemiOblique.ttf
LucidaSansOblique.ttf
LucidaSansRegular.ttf
LucidaTypewriterBold.ttf
LucidaTypewriterBoldOblique.ttf
LucidaTypewriterOblique.ttf
LucidaTypewriterRegular.ttf
LucidaBrightDemiBold.ttf
LucidaBrightDemiItalic.ttf
LucidaBrightItalic.ttf
LucidaBrightRegular.ttf


Copyright © 2002 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: java-intl@java.sun.com

Sun
Java Software