当前位置: 代码迷 >> 综合 >> 解决报错Text note: Client requested name “.SFNS-Regular“, it will get Times-Roman rather than the intend
  详细解决方案

解决报错Text note: Client requested name “.SFNS-Regular“, it will get Times-Roman rather than the intend

热度:116   发布时间:2023-11-27 18:52:39.0

使用idea运行javafx项目时常常报错:

CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].

而运行结果也出现乱码:

原来是我的jdk版本太低(jdk11.0.12),换一个更高一点就OK了。

我在新建的页面,改用jdk17:

新建一个项目,然后运行:

 

就解决了。

 

 

  相关解决方案