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

Print this page




 525      * added or subtracted.
 526      * This means, specifying a bold face and a bold style does not
 527      * double-embolden the font, and specifying a bold face and a plain
 528      * style does not lighten the font.
 529      * <p>
 530      * If no face for the requested style can be found, the font system
 531      * may apply algorithmic styling to achieve the desired style.
 532      * For example, if <code>ITALIC</code> is requested, but no italic
 533      * face is available, glyphs from the plain face may be algorithmically
 534      * obliqued (slanted).
 535      * <p>
 536      * Font name lookup is case insensitive, using the case folding
 537      * rules of the US locale.
 538      * <p>
 539      * If the <code>name</code> parameter represents something other than a
 540      * logical font, i.e. is interpreted as a physical font face or family, and
 541      * this cannot be mapped by the implementation to a physical font or a
 542      * compatible alternative, then the font system will map the Font
 543      * instance to "Dialog", such that for example, the family as reported
 544      * by {@link #getFamily() getFamily} will be "Dialog".
 545      * <p>
 546      *
 547      * @param name the font name.  This can be a font face name or a font
 548      * family name, and may represent either a logical font or a physical
 549      * font found in this {@code GraphicsEnvironment}.
 550      * The family names for logical fonts are: Dialog, DialogInput,
 551      * Monospaced, Serif, or SansSerif. Pre-defined String constants exist
 552      * for all of these names, for example, {@code DIALOG}. If {@code name} is
 553      * {@code null}, the <em>logical font name</em> of the new
 554      * {@code Font} as returned by {@code getName()} is set to
 555      * the name "Default".
 556      * @param style the style constant for the {@code Font}
 557      * The style argument is an integer bitmask that may
 558      * be {@code PLAIN}, or a bitwise union of {@code BOLD} and/or
 559      * {@code ITALIC} (for example, {@code ITALIC} or {@code BOLD|ITALIC}).
 560      * If the style argument does not conform to one of the expected
 561      * integer bitmasks then the style is set to {@code PLAIN}.
 562      * @param size the point size of the {@code Font}
 563      * @see GraphicsEnvironment#getAllFonts
 564      * @see GraphicsEnvironment#getAvailableFontFamilyNames
 565      * @since JDK1.0




 525      * added or subtracted.
 526      * This means, specifying a bold face and a bold style does not
 527      * double-embolden the font, and specifying a bold face and a plain
 528      * style does not lighten the font.
 529      * <p>
 530      * If no face for the requested style can be found, the font system
 531      * may apply algorithmic styling to achieve the desired style.
 532      * For example, if <code>ITALIC</code> is requested, but no italic
 533      * face is available, glyphs from the plain face may be algorithmically
 534      * obliqued (slanted).
 535      * <p>
 536      * Font name lookup is case insensitive, using the case folding
 537      * rules of the US locale.
 538      * <p>
 539      * If the <code>name</code> parameter represents something other than a
 540      * logical font, i.e. is interpreted as a physical font face or family, and
 541      * this cannot be mapped by the implementation to a physical font or a
 542      * compatible alternative, then the font system will map the Font
 543      * instance to "Dialog", such that for example, the family as reported
 544      * by {@link #getFamily() getFamily} will be "Dialog".

 545      *
 546      * @param name the font name.  This can be a font face name or a font
 547      * family name, and may represent either a logical font or a physical
 548      * font found in this {@code GraphicsEnvironment}.
 549      * The family names for logical fonts are: Dialog, DialogInput,
 550      * Monospaced, Serif, or SansSerif. Pre-defined String constants exist
 551      * for all of these names, for example, {@code DIALOG}. If {@code name} is
 552      * {@code null}, the <em>logical font name</em> of the new
 553      * {@code Font} as returned by {@code getName()} is set to
 554      * the name "Default".
 555      * @param style the style constant for the {@code Font}
 556      * The style argument is an integer bitmask that may
 557      * be {@code PLAIN}, or a bitwise union of {@code BOLD} and/or
 558      * {@code ITALIC} (for example, {@code ITALIC} or {@code BOLD|ITALIC}).
 559      * If the style argument does not conform to one of the expected
 560      * integer bitmasks then the style is set to {@code PLAIN}.
 561      * @param size the point size of the {@code Font}
 562      * @see GraphicsEnvironment#getAllFonts
 563      * @see GraphicsEnvironment#getAvailableFontFamilyNames
 564      * @since JDK1.0