package jira; import javafx.animation.SequentialTransition; import javafx.animation.TranslateTransition; import javafx.application.Application; import javafx.geometry.VPos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.text.Font; import javafx.scene.text.FontPosture; import javafx.scene.text.FontSmoothingType; import javafx.scene.text.Text; import javafx.stage.Stage; import javafx.util.Duration; public class RT30711 extends Application { public static void main(String[] args) { System.setProperty("prism.lcdtext", "true"); // System.setProperty("prism.text", "coretext"); launch(args); } @Override public void start(Stage stage) { double fontSize = 50; // Font font = Font.font("Times New Roman", FontPosture.ITALIC, fontSize); // Font font = Font.font("Arial", FontPosture.ITALIC, fontSize); // Font font = Font.font("Calibri", FontPosture.ITALIC, fontSize); // Font font = Font.font("Cambria", FontPosture.ITALIC, fontSize); // Font font = Font.font("Courier New", FontPosture.ITALIC, fontSize); Font font = Font.font("Zapfino", FontPosture.ITALIC, fontSize); //shows the need for padding on top and bottom (gray) // Font font = Font.font("Verdana", FontPosture.ITALIC, fontSize); // Font font = Font.font("Segoe UI", FontPosture.ITALIC, fontSize); // Font font = Font.font("Lucida Sans", FontPosture.ITALIC, fontSize); // Font font = Font.font("Helvetica", FontPosture.ITALIC, fontSize); // Font font = Font.font("Apple Chancery", fontSize); Text text = new Text(); text.setText("for the Love!f"); text.setFont(font); // text.setFontSmoothingType(FontSmoothingType.LCD); text.setTextOrigin(VPos.TOP); text.setTranslateX(10); text.setTranslateY(10); TranslateTransition t1 = new TranslateTransition(new Duration(8000), text); t1.setToX(300); TranslateTransition t2 = new TranslateTransition(new Duration(1000), text); t2.setToY(text.getBoundsInLocal().getHeight()*2); TranslateTransition t3 = new TranslateTransition(new Duration(8000), text); t3.setToX(10); SequentialTransition t = new SequentialTransition(t1, t2, t3); t.play(); Group root = new Group(text); Scene scene = new Scene(root, 800, 400); stage.setScene(scene); stage.show(); } }