FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Yosemite 10.10.5
EXTRA RELEVANT SYSTEM CONFIGURATION :
MacBook Pro 13", Retina, with external, non-Retina screen attached via DisplayPort.
A DESCRIPTION OF THE PROBLEM :
Font rendering looks wrong when certain characters are adjacent, it looks acceptable on the Retina screen, but less so on the non-Retina screen. I have screenshots demonstrating the issue.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Standard system font on JavaFX button, with characters 'r' and 't' adjacent, i.e. I have a button with:
'Let's get started...' where the r and t in 'started' looks wrong.
Making a new FXML project in NetBeans, and putting 'Let's get started...' into the button will demonstrate the issue.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would expect the text to be kerned correctly on both screens.
ACTUAL -
On the Retina screen, the text appears acceptable kerned (not sure if it's 100% correct), but on the non-Retina, it's notably different.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package kernfx;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/**
*
* @author gt
*/
public class KernFX extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package kernfx;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
/**
*
* @author gt
*/
public class FXMLDocumentController implements Initializable {
@FXML
private Label label;
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml/1" fx:controller="kernfx.FXMLDocumentController">
<children>
<Button layoutX="126" layoutY="90" text="Let's get started..." />
</children>
</AnchorPane>
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround, other than to use a Retina screen.