Vertical alignment of OpenType font

5 ビュー (過去 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 Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by