Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4203717

Unable to use Font names ending in Bold, Italic, or BoldItalic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs
    • 2d
    • x86
    • windows_nt



      Name: clC74495 Date: 01/16/99


      On Windows 98/Win NT 4.0 (don't have access to Win95 at moment,
      not sure if Solaris problem), if I set the font to a valid platform font
      name ending in Bold, Italic, or BoldItalic, the Java runtime will strip
      this from the end of the font it asks the operating system for. If this
      new font name doesn't exist, the runtime will then use the Arial font.

      For instance, if you have an 'Arial Italic' font on your system, and want
      to use IT with Font.PLAIN, instead of Arial and an attribute of Font.ITALIC,
      you will get Arial and Font.PLAIN.

      If you have 'Albertus Extra Bold' and won't to use it, you can't because
      the system tries to use Albertus Extra, can't find it, then uses plain Arial,
      resulting in unbolded text drawn.

      There is a atest program in the workaround area. You may need to customize
      it for fonts available on your system.

      Program shows that:
      1) Fonts that don't exist are mapped to Arial.
      2) Suffixes "Bold", "Italic", and "BoldItalic" (but not "Bold Italic") are stripped
         off if the font exists. Look at getFamily().
      3) Because (?) the suffixes are stripped off, the resulting font is wrong and
         doesn't show (in bold or italic if appropriate).

      (Review ID: 52494)
      ======================================================================

            pkejriwasunw Parry Kejriwal (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: