@@ -0,0 +1,1392 @@
+package org.fxmisc.richtext.demo;%0A%0Aimport javafx.application.Application;%0Aimport javafx.scene.Scene;%0Aimport javafx.scene.control.Button;%0Aimport javafx.scene.layout.HBox;%0Aimport javafx.scene.layout.Priority;%0Aimport javafx.scene.layout.VBox;%0Aimport javafx.stage.Stage;%0A%0Aimport org.fxmisc.richtext.StyleClassedTextArea;%0A%0Apublic class FontSizeSwitcher extends Application %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        launch(args);%0A    %7D%0A%0A    @Override%0A    public void start(Stage primaryStage) %7B%0A        StyleClassedTextArea area = new StyleClassedTextArea();%0A        area.setWrapText(true);%0A        for(int i = 0; i %3C 10; ++i) %7B%0A            area.appendText(%22Lorem ipsum dolor sit amet, consectetur adipiscing elit.%5Cn%22);%0A        %7D%0A%0A        HBox panel = new HBox();%0A        for(int size: new int%5B%5D%7B8, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72%7D) %7B%0A            Button b = new Button(Integer.toString(size));%0A            b.setOnAction(ae -%3E area.setStyle(%22-fx-font-size:%22 + size));%0A            panel.getChildren().add(b);%0A        %7D%0A%0A        VBox vbox = new VBox();%0A        VBox.setVgrow(area, Priority.ALWAYS);%0A        vbox.getChildren().addAll(panel, area);%0A%0A        Scene scene = new Scene(vbox, 600, 400);%0A        primaryStage.setScene(scene);%0A        area.requestFocus();%0A        primaryStage.setTitle(%22Font Size Switching Test%22);%0A        primaryStage.show();%0A    %7D%0A%7D%0A

Add demo to switch font size of the whole area by CSS.