import java.util.List;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.Stage;

public class Test extends Application {
	@Override
	public void start(Stage primaryStage) {
		var fonts = List.of("JetBrainsMonoNL-Bold.ttf", "JetBrainsMonoNL-BoldItalic.ttf", "JetBrainsMonoNL-Regular.ttf",
				"JetBrainsMonoNL-Light.ttf", "JetBrainsMonoNL-LightItalic.ttf", "JetBrainsMonoNL-Thin.ttf",
				"JetBrainsMonoNL-ThinItalic.ttf");
		fonts.forEach(f -> Font.loadFont(Test.class.getResource(f).toExternalForm(), 10));
		System.out.println(javafx.scene.text.Font.getFamilies());

		var label1 = new Label("Some text");
		label1.setStyle("-fx-font-family: 'JetBrains Mono NL';-fx-font-weight: normal;");// OK
		var label2 = new Label("Some text");
		label2.setStyle("-fx-font-family: 'JetBrains Mono NL';-fx-font-weight: 100;");// NOT OK
		var label3 = new Label("Some text");
		label3.setStyle("-fx-font-family: 'JetBrains Mono NL Thin';-fx-font-weight: normal;");// OK
		var root = new VBox(label1, label2, label3);
		root.setStyle("-fx-font-size: 18px");
		Scene scene = new Scene(root, 400, 200);
		primaryStage.setScene(scene);
		primaryStage.show();
	}

	public static void main(String[] args) {
		launch(args);
	}
}