Hey i want change the font of my TextArea but this don't work I have found this But don't work :(.
And my Font.loadFont("file:resources/fonts/EditorFont.ttf", 120)
return always null
I have tried with css but don't work
area = new TextArea();
Color color = Constants.BACKGROUND;
double red = color.getRed()*255;
double blue = color.getBlue()*255;
double green = color.getGreen()*255;
String rgbColor = "rgb(" + red + ", " + blue + " , " + green + ")";
setCanTakeAllSize(area);
area.setOnKeyTyped(event -> highlight());
area.setOnScrollFinished(event -> highlight());
area.setStyle("" +
"-fx-control-inner-background: " + rgbColor + ";" +
"-fx-font-size: 2em;" +
"-fx-font-family: Consolas;");
area.setFont(Font.loadFont("file:resources/fonts/EditorFont.ttf", 120));
//Logger.log(Font.loadFont("file:resources/fonts/EditorFont.ttf", 120));
layout.add(area, 0, 0);