How to add Fonts correctly

2 views (last 30 days)
Dominik
Dominik on 15 May 2012
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

Answers (1)

Walter Roberson
Walter Roberson on 15 May 2012
  1 Comment
rfsleal
rfsleal on 30 May 2012
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.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!