How to add Fonts correctly

2 ビュー (過去 30 日間)
Dominik
Dominik 2012 年 5 月 15 日
Hi, my question is: How can I use custom fonts in images ('text' command) properly. We are running Matlab 2012a on Ubuntu 10.10 Server and need to create images with embedded text with a custom font available in .ttf Format. I have installed the font in every possible way. Copying it to ~/.fonts, /usr/share/fonts/truetype and in the Matlab /opt/matlab/R2012a/sys/fonts/ttf folder. It is available in the "Preferences -> Fonts -> Desktop Code Fonts Menu", but not in the "listfonts" output. When using it with text('FontName',...) it results in a fallback font. With Windows 7, it works by simply installing the font... Any idea, what could have gone wrong?
With kind regards Dominik

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 5 月 15 日
  1 件のコメント
rfsleal
rfsleal 2012 年 5 月 30 日
Same over here. As super user I installed http://www.dafont.com/jsl-ancient.font with KDE font manager as a system font. I can use this or any other of the installed system font sets in the matlab desktop, command, editor, etc. and can even see it in uisetfont. Yet I cannot see it in listfonts neither use it in figures. Applying this font makes the text to revert to the first font listed in listfonts. What's the problem here? AFAIK the desktop fonts are handled by Java, and the figures are done with X, right? Best regs.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by