< prev index next >

src/java.desktop/share/classes/java/awt/Font.java

Print this page




 111  * Latin.
 112  * The set of available physical fonts varies between configurations.
 113  * Applications that require specific fonts can bundle them and instantiate
 114  * them using the {@link #createFont createFont} method.
 115  * <p>
 116  * <em>Logical</em> fonts are the five font families defined by the Java
 117  * platform which must be supported by any Java runtime environment:
 118  * Serif, SansSerif, Monospaced, Dialog, and DialogInput.
 119  * These logical fonts are not actual font libraries. Instead, the logical
 120  * font names are mapped to physical fonts by the Java runtime environment.
 121  * The mapping is implementation and usually locale dependent, so the look
 122  * and the metrics provided by them vary.
 123  * Typically, each logical font name maps to several physical fonts in order to
 124  * cover a large range of characters.
 125  * <p>
 126  * Peered AWT components, such as {@link Label Label} and
 127  * {@link TextField TextField}, can only use logical fonts.
 128  * <p>
 129  * For a discussion of the relative advantages and disadvantages of using
 130  * physical or logical fonts, see the
 131  * <a href="http://www.oracle.com/technetwork/java/javase/tech/faq-jsp-138165.html">Internationalization FAQ</a>


 132  * document.
 133  *
 134  * <h3>Font Faces and Names</h3>
 135  *
 136  * A <code>Font</code>
 137  * can have many faces, such as heavy, medium, oblique, gothic and
 138  * regular. All of these faces have similar typographic design.
 139  * <p>
 140  * There are three different names that you can get from a
 141  * <code>Font</code> object.  The <em>logical font name</em> is simply the
 142  * name that was used to construct the font.
 143  * The <em>font face name</em>, or just <em>font name</em> for
 144  * short, is the name of a particular font face, like Helvetica Bold. The
 145  * <em>family name</em> is the name of the font family that determines the
 146  * typographic design across several faces, like Helvetica.
 147  * <p>
 148  * The <code>Font</code> class represents an instance of a font face from
 149  * a collection of  font faces that are present in the system resources
 150  * of the host system.  As examples, Arial Bold and Courier Bold Italic
 151  * are font faces.  There can be several <code>Font</code> objects




 111  * Latin.
 112  * The set of available physical fonts varies between configurations.
 113  * Applications that require specific fonts can bundle them and instantiate
 114  * them using the {@link #createFont createFont} method.
 115  * <p>
 116  * <em>Logical</em> fonts are the five font families defined by the Java
 117  * platform which must be supported by any Java runtime environment:
 118  * Serif, SansSerif, Monospaced, Dialog, and DialogInput.
 119  * These logical fonts are not actual font libraries. Instead, the logical
 120  * font names are mapped to physical fonts by the Java runtime environment.
 121  * The mapping is implementation and usually locale dependent, so the look
 122  * and the metrics provided by them vary.
 123  * Typically, each logical font name maps to several physical fonts in order to
 124  * cover a large range of characters.
 125  * <p>
 126  * Peered AWT components, such as {@link Label Label} and
 127  * {@link TextField TextField}, can only use logical fonts.
 128  * <p>
 129  * For a discussion of the relative advantages and disadvantages of using
 130  * physical or logical fonts, see the
 131  * <a href="https://docs.oracle.com/javase/tutorial/2d/text/fonts.html#advantages-and-disadvantages">
 132  *    Physical and Logical Fonts</a>
 133  * in <a href="https://docs.oracle.com/javase/tutorial/index.html">The Java Tutorials</a>
 134  * document.
 135  *
 136  * <h3>Font Faces and Names</h3>
 137  *
 138  * A <code>Font</code>
 139  * can have many faces, such as heavy, medium, oblique, gothic and
 140  * regular. All of these faces have similar typographic design.
 141  * <p>
 142  * There are three different names that you can get from a
 143  * <code>Font</code> object.  The <em>logical font name</em> is simply the
 144  * name that was used to construct the font.
 145  * The <em>font face name</em>, or just <em>font name</em> for
 146  * short, is the name of a particular font face, like Helvetica Bold. The
 147  * <em>family name</em> is the name of the font family that determines the
 148  * typographic design across several faces, like Helvetica.
 149  * <p>
 150  * The <code>Font</code> class represents an instance of a font face from
 151  * a collection of  font faces that are present in the system resources
 152  * of the host system.  As examples, Arial Bold and Courier Bold Italic
 153  * are font faces.  There can be several <code>Font</code> objects


< prev index next >