Vertical alignment of OpenType font

1 Ansicht (letzte 30 Tage)
Fredrik P
Fredrik P am 17 Jun. 2020
Beantwortet: Nipun Agarwal am 18 Jun. 2020
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.

Antworten (1)

Nipun Agarwal
Nipun Agarwal am 18 Jun. 2020
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

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by