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

Rounding dpi to integral in PangoFonts.java

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7
    • client-libs
    • 2d
    • x86
    • linux

      FULL PRODUCT VERSION :
      java version "1.6.0"
      OpenJDK Runtime Environment (build 1.6.0-b09)
      OpenJDK Server VM (build 1.6.0-b09, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux localhost.localdomain 2.6.26.5-45.fc9.i686 #1 SMP Sat Sep 20 03:45:00 EDT 2008 i686 i686 i386 GNU/Linux
      Fedora 9

      A DESCRIPTION OF THE PROBLEM :
      The gnome dpi is really a scale factor, and its not always going to scale to an integral number of pixels, so java font rendering makes rounding.

      If the gnome default is 10 pts @ 96 dpi that's 13.33 pixels, At 98 dpi that's 13.6 pixels, so one rounds to 13, the other to 14.

      As a result, Java applications fonts are not rendering the same as Gnome applications except for some limited values. For example, fonts are rendered exactly the same way in Java applications from a dpi of 90 going to a dpi of 97 (only changes for dpi=89 and dpi=98), this makes them look not proportional to the other desktop applications font.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            prr Philip Race
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: