Hi Clement,
I understand that you want to get rid of the warning messages that are displayed generated by “CoreText”.
These outputs are notes or warnings generated by CoreText, a text layout and rendering engine used by macOS. These notes indicate that MATLAB is requesting a specific font name (".HelveticaNeueDeskInterface-Regular") that is not available, and as a fallback, the system is providing a different font (Times-Roman) instead. They are typically harmless and do not affect the functionality of MATLAB.
To get rid of the “CoreText” warnings while running MATLAB in the Terminal on macOS Monterey redirect the specific warning messages to /dev/null. Here's how you can do it:
- Modify the “alias” command that you are using to redirect only the CoreText warnings to /dev/null in this way:
alias matlab="(/Applications/MATLAB_R2021b.app/bin/matlab 2>&1 | grep -v 'CoreText' >&2)"
- This modified command does the following:
2>&1: Redirects stderr (standard error) to stdout (standard output).
| grep -v 'CoreText': Pipes the output to grep and uses the -v flag to exclude lines containing the word "CoreText".
>&2: Redirects the filtered output back to stderr.
- Finally, execute the “matlab -nodesktop” command on Terminal to start MATLAB without the “CoreText” warnings. The “CoreText” warnings will no longer displayed in the Terminal while running MATLAB.
Please note that this approach filters out lines containing the word "CoreText" from the output. If there are other lines you want to exclude, you can modify the "grep" command accordingly. Keep in mind that this method redirects specific warnings while still allowing other errors and output to be displayed.
I hope this helps!
Regards,
Nivedita.