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.
SeeRT-35322
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
- relates to
-
JDK-8096820 [Text] Name of any samples is wrong in Ensemble8
- Resolved