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

Windows printing uses symbol encoding where present in fonts instead of unicode encoding.

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      windows

      Description

      Run the attached small code snippet on Windows. In draws three lines of characters on a Canvas which is also Printable. Pressing 'p' would send this Printable to your default printer.

      Now, if the font set is Webdings or (perhaps more interesting) Symbol, on the screen there will be placeholder rectangles but paper printout will contain pictographs (or Greek letters in case of Symbol) mapped to correspondent ASCII places in the fonts.

      It works this way with just about any supported version of JDK started from 1.5 -- so it is not a regression -- feel free to downgrade it to P4.
      I observe this behavior on Windows platforms only. For instance my Ubuntu 12.04 would print rectangles very consistently.

      Note the many manual test failures in https://jbs.oracle.com/bugs/browse/INTJDK-7600811 (internal test).

        Attachments

        1. AntialiasTableTest-display.jpg
          AntialiasTableTest-display.jpg
          216 kB
        2. AntialiasTableTest-printout.jpg
          AntialiasTableTest-printout.jpg
          62 kB
        3. FontDemo.java
          2 kB
        4. image.zip
          3.05 MB

          Activity

            People

            Assignee:
            prr Philip Race
            Reporter:
            yan Yuri Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: