Vertical alignment of OpenType font

조회 수: 1 (최근 30일)
Fredrik P
Fredrik P 2020년 6월 17일
답변: Nipun Agarwal 2020년 6월 18일
I have tried to use the font Fira Sans in my figures but fail to use its OpenType version in Matlab R2019a on Windows 10. My MWE is
plot(magic(3));
legend('location', 'eastoutside');
set(gca, 'FontName', 'Fira Sans');
which if I have the OpenType version of Fira Sans installed causes text to be vertically aligned to high up, that is a bit higher than the lines in the legend. However, if I uninstall OpenType Fira Sans and instead install the TrueType version then everything looks right. I would really prefer to have the OpenType version installed. Is there somehow I can adjust the vertical alignment of the text in a figure? Or could I make Matlab use the TrueType version while at the same time have the OpenType version to be used by other programs.

답변 (1개)

Nipun Agarwal
Nipun Agarwal 2020년 6월 18일
Hey,
I can think of two ways of addressing this. Instead of uninstalling OpenType and TrueType fonts, you can have them installed in your machine and specify MATLAB to use TrueType fonts. This will change the Font of the whole MATLAB View. You can refer this link for more info on changing fonts.
Other way could be to just change the Font Properties of the Chart, so that it uses TrueType fonts. Refer to the following link on how to do so

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by