Using Web Fonts with JavaFX
<p>I want to figure out how to load a web icon font (from Google Material Design Icons) into my JavaFx app as a font, rather than using the icons themselves. Is this possible? I know that this can be done in CSS, just not sure if it works in JavaFX-CSS. I tried using @font-font and specifying the URL in css, but I get <code>com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged</code> and <code>Could not load @font-face font [https://fonts.googleapis.com/icon?family=Material+Icons]</code> </p>

<p>Please let me know if this can be done, Thanks!!!</p>

<p>Here is my StyleSheet:</p>

<pre><code>@font-face {
    src: url('https://fonts.googleapis.com/icon?family=Material+Icons');
}

.button {
    -fx-background-color: transparent;
    -fx-background-radius: 0;
    -fx-border-style: none;
    -fx-text-fill: white;
    -fx-font-family: 'Material Icons';
    -fx-font: 20;

}
</code></pre>

<p>Java Class: </p>

<pre><code>import javafx.application.Application;
import javafx.beans.binding.StringBinding;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

/**
 * Created by digitalblueeye on 2/11/16.
 */
public class Revamp extends Application {
    public static void main(String args[]) {
        launch(args);
    }
    @Override
    public void start(Stage stage) throws Exception {

        BorderPane root = new BorderPane();
        root.setId("root");
        Scene scene = new Scene(root,1000,800);
        scene.getStylesheets().add("Assets/StyleSheets/Styles.css");

        HBox ProjectBar = new HBox();
        ProjectBar.setId("project-bar");
        Button MenuButton = new Button("Menu");
        Label ProjectName = new Label("My Project");
        Label SaveStatus = new Label("All changes saved.");
        ComboBox&lt;?&gt; LaunchButton = new ComboBox&lt;&gt;();

        ProjectBar.getChildren().addAll(MenuButton,ProjectName,SaveStatus,LaunchButton);

        TabPane tabhome = new TabPane();
        tabhome.setId("tab-home");
        Tab welcomeTab = new Tab("Startup");
        tabhome.getTabs().add(welcomeTab);

        BorderPane content = new BorderPane();
        HBox toolBar = new HBox();
        toolBar.setId("tool-bar");
        ChoiceBox toolSelector = new ChoiceBox();
        ChoiceBox textElements = new ChoiceBox();
        ChoiceBox layoutElements = new ChoiceBox();
        ChoiceBox InteractiveElements = new ChoiceBox();
        ChoiceBox mediaElements = new ChoiceBox();
        ComboBox viewPercent = new ComboBox();
        Button zoomplus = new Button("zoom_in");
        Button zoomminus = new Button("zoom_out");
        toolBar.getChildren().addAll(toolSelector,textElements,layoutElements,
                                        InteractiveElements,mediaElements,viewPercent,
                                        zoomplus,zoomminus);
        content.setTop(toolBar);
        welcomeTab.setContent(content);



        VBox header = new VBox();
        header.getChildren().addAll(ProjectBar,tabhome);





        root.setTop(header);

        stage.setScene(scene);
        stage.show();
    }
}
</code></pre>