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

使用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:].

而运行结果也出现乱码:

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

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

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

解决报错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

就解决了。

 

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

 

上一篇:SpringBoot中通过重写WebMvcConfigurer的方法配置静态资源映射实现图片上传后返回网络Url


下一篇:idea提交代码到gitee报错:The requested URL returned error: 403