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

[Font] Font.equals can return true for different fonts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u20
    • javafx
    • None

      Font.equals uses full name to determine if the fonts are equals. But it is possible that fonts have the same name but are actually different.
      Font example
      Font f1 = new Font("Joe", 20); //suppose the font "Joe" is installed on the system
      Font f2 = Font.loadFont(someInputStream, 20); //someInputStream point to a font named Joe, that is different than f1.
      Font f3 = Font.loadFont(someOtherInputStream, 20);//again, the name can be Joe

      It is possible that f1 != f2 != f3 but the name is Joe for them all.
      See RT-35322


            prr Philip Race
            fheidric Felipe Heidrich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: