CoreText Font Error on MacOS Big Sur

28 次查看(过去 30 天)
Jack Shannon
Jack Shannon 2021-2-1
编辑: Walter Roberson 2024-11-14,19:43
Since upgrading to R2020b on Big Sur, whenever I start MATLAB from the command line (matlab -nodesktop -nosplash), I get the following error messages:
< M A T L A B (R) >
Copyright 1984-2020 The MathWorks, Inc.
R2020b Update 1 (9.9.0.1495850) 64-bit (maci64)
September 30, 2020
To get started, type doc.
For product information, visit www.mathworks.com.
>> 2021-02-01 06:44:12.194 MATLAB_maci64[42710:446809] 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:].
2021-02-01 06:44:12.194 MATLAB_maci64[42710:446809] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2021-02-01 06:44:12.200 MATLAB_maci64[42710:446809] CoreText note: Client requested name ".SFNS-Bold", 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:].
2021-02-01 06:44:12.425 MATLAB_maci64[42710:446809] 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:].
2021-02-01 06:44:12.426 MATLAB_maci64[42710:446809] CoreText note: Client requested name ".SFNS-Bold", 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:].
I get the same error messages in the terminal when I use just type matlab as well. When I start MATLAB normally by clicking the application icon, these error messages do not appear in the command window. I did not experience these problems whe using R2020a on Catalina or R2020a on Big Sur.
  13 个评论
Paras Patel
Paras Patel 2021-10-5
Hi - I just ran into this issue today as well and I searched google for a fix. Did not find any but I'm able to suppress it via (see below) which solves my immediate annoyance.
/Applications/MATLAB_R2021a.app/bin/matlab -nosplash -nodesktop 2> >(grep -v CoreText)
(i.e. I added the 2> >(grep -v CoreText) to redirect the stderr to grep and filtered out CoreText).
I would appreciate a more robust solution from MW though.
Peter G
Peter G 2022-2-10
I get the same on a macbook pro running 2021b under Catalina
MATLAB CoreText note: Client requested name ".SFNS-Bold", 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:].

请先登录,再进行评论。

回答(2 个)

M. A. Hopcroft
M. A. Hopcroft 2022-5-9
I had the same issue until just now and it looks like I got lucky with a solution. I had a java-related Matlab crash, and the Crash Reporter suggested this solution, which is to replace the Java JRE that is installed with Matlab with a different version:
I followed this procedure (replaced the MW JRE with the Adoptium JRE 8) for both R2020b and R2021b, and in both cases the font warning no longer appears. I have only tried this on macOS Monterey 12.3.1.
PS - Note that Java version 8 is not the default download at the Adoptium site, you have to select it specifically.
  2 个评论
jaydeequeue
jaydeequeue 2022-7-9
This worked for me under macOS Monterey 12.4 and MATLAB 2021a after installing the macOS JRE package for release jdk8u332-b09 found at https://adoptium.net/temurin/archive?version=8, removing /Applications/MATLAB_R2021a.app/sys/java/jre/maci64/jre, then making a symbolic link from /Applications/MATLAB_R2021a.app/sys/java/jre/maci64/jre to /Library/Java/JavaVirtualMachines/temurin-8.jre/Contents/Home
David Donoso
David Donoso 2024-11-14,19:12
编辑:David Donoso 2024-11-14,19:14
This also worked for me but under macOS Sonoma 14.7.1 and MATLAB2023b after:
1) Installing OpenJDK8U-jre_x64_mac_hotspot_8u432b06.pkg found at https://adoptium.net/es/temurin/releases/?version=8
2) Rename "/Applications/MATLAB_R2023b.app/sys/java/jre/maci64/jre" to "/Applications/MATLAB_R2023b.app/sys/java/jre/maci64/jre_ORIGINAL" (avoid to lose the original installation)
3) Change directoty to "/Applications/MATLAB_R2023b.app/sys/java/jre/maci64" and make a symbolic link from "/Library/Java/JavaVirtualMachines/temurin-8.jre/Contents/Home" to a new "jre"

请先登录,再进行评论。


Joshua O'Reilly
Joshua O'Reilly 2021-10-9
编辑:Walter Roberson 2024-11-14,19:43
I found adding the
-nodisplay
flag to your command fixed it for me (or maybe just surpressed it). So:
matlab -nodesktop -nosplash -nodisplay
I'm running MATLAB R2021a on a Macbook Air M1 with macOS 11.6.
Edit: based on this article, you may be able to get away with just -nodisplay:
  2 个评论
Jack Shannon
Jack Shannon 2021-10-9
Thanks for the suggestion! I tried this and it did indeed suppress the error message, but this works only if I need no display features at all; if I wanted to create figures from the command line, I would not be able to. I did try starting matlab with the -nodisplay option and then ran the plot command, which produced the same error messages but no plot! There seems to be a problem with the way that MATLAB requests fonts from the OS whenever it creates display windows, and using -nodisplay just stops those requests but does not fix the underlying error.
Joshua O'Reilly
Joshua O'Reilly 2021-10-9
Oh, well that's no good. Sorry for the bad recommendation, I got this "working" today and hadn't tried creating figures yet.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by