MATLAB: Is the font in the list box not set properly in MATLAB 7.0.4 (R14SP2) on a Linux machine

MATLAB

I am running MATLAB 7.0.4 (R14SP2) on a Linux machine. I have a list box that I create by executing the following commands:
h_gui = figure;
h1 = uicontrol(h_gui,'Style','listbox',...
'Units','normalized',...
'Position',[0.12 0.13 0.86 0.785],...
'FontName','FixedWidth',...
'FontUnits','normalized',...
'FontSize',0.04,...
'Max',2,...
'Tag','simulations.listbox');
set(h1, 'string', ['_____5_____10_____15';' 8 30 426']);
I would like to use a fixed width font, however, the font that appears is not fixed width. When I try to manually change the font to a specific type, only certain fonts are set correctly.

Best Answer

This is a bug in MATLAB 7.0.4 (R14SP2) when using the 'FixedWidth' font setting for a uicontrol object. The bug appears when the 'FixedWidth' font default, 'Courier New', is not available on the user's machine.
To work around this issue, you can use the Property Editor to change the font in the listbox and choose an alternative fixed width font. To do this, perform the following steps:
1. Create the figure and listbox, then select " Property Editor" from the figure's View menu.
2. Right Click on the listbox to select it in the property editor.
3. Change the fonts using the Property Editor until an appropriate one is found.
One commonly available fixed width font alternative to 'Courier New' is 'Monospaced'.