How change the font type of Greek Letters at MATLAB TeX text? The 'FontName' does not work.
I try this code:
text(0.5, 0.7,'\it\Omega \phi A b','FontName','Times New Roman','FontSize',50);
text(0, 0.7,'\rm\Omega \phi A b','FontName','Times New Roman','FontSize',50);
text(0.5, 0.3,'\it\Omega \phi A b','FontName','Arial','FontSize',50);
text(0, 0.3,'\rm\Omega \phi A b','FontName','Arial','FontSize',50);
and this:
text(0.5, 0.7,'\fontname{Times New Roman}\it\Omega \phi A b','FontSize',50);
text(0, 0.7,'\fontname{Times New Roman}\rm\Omega \phi A b','FontSize',50);
text(0.5, 0.3,'\fontname{Arial}\it\Omega \phi A b','FontSize',50);
text(0, 0.3,'\fontname{Arial}\rm\Omega \phi A b','FontSize',50);
At the MATLAB 2012a this result
At the MATLAB 2015b this result
The font type of Greek Letters does not depend on the 'FontName'. But the font type of Greek Letters depends on the MATLAB version.
I'm trying to find a solution but unfortunately i'm having no good results. This is what i tried additionally (cannot post in the comments since it is too long):
text(0.5, 0.7,'$\fontfamily{times} \it\Omega \phi A b$','interpreter','latex');
text(0.5, 0.7,'$\setmainfont{times} \it\Omega \phi A b$','interpreter','latex');
text(0.5, 0.3,'\fontname{GFS Artemisia}\it\Omega \phi A b','FontSize',50);
This one is the closest i got:
text(0.5, 0.7,'$\textsf{GFSArtemisia} \it\Omega \phi A b$','interpreter','latex');
It gives you a warning (Font cmss10 is not supported. To be clear i'm on matlab R2022a) that led me into a rabbit hole with most probably no end:
https://ch.mathworks.com/matlabcentral/answers/412684-how-do-i-add-latex-fonts-in-matlab