当前位置: 首页 > 工具软件 > Note IT > 使用案例 >

CoreText note: Client requested name “.SFNS-Regular“, it will get Times-Roman rather than the intend

柯翔
2023-12-01

控制台报错:2022-03-08 15:14:21.870 java[6641:185664] 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:].
2022-03-08 15:14:21.870 java[6641:185664] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2022-03-08 15:14:21.874 java[6641:185664] 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:].
2022-03-08 15:14:21.987 java[6641:185725] 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:].

解决办法:提高依赖版本:

<dependencies>
    <!-- https://mvnrepository.com/artifact/org.openjfx/javafx-controls -->
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>17.0.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.openjfx/javafx-fxml -->
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-fxml</artifactId>
        <version>17.0.2</version>
    </dependency>
 类似资料: