Skip to content

Commit

Permalink
更新 HelloController.java
Browse files Browse the repository at this point in the history
增加信息提示,用以检查字体是否正确load
  • Loading branch information
iammmmmmm authored Oct 27, 2024
1 parent c1223e3 commit c132faf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/caidanci/HelloController.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ private boolean checkWord(String word) {
void initialize() {

Font a = Font.loadFont(Objects.requireNonNull(this.getClass().getResourceAsStream("fonts/fzjt.ttf")), 0);
showAlert(Alert.AlertType.WARNING, "错误!", "!", "font.getFamily:" + a.getFamily()+"!");
Platform.runLater(() -> tm.setFontFamily(a.getFamily()));
Platform.runLater(() -> tm.addScene(info.getScene()));

Expand Down

0 comments on commit c132faf

Please sign in to comment.