| Contents | Index |
c = listfonts
c = listfonts(h)
c = listfonts returns sorted list of available system fonts.
c = listfonts(h) returns sorted list of available system fonts and includes the FontName property of the object with handle h.
Calling listfonts returns a list of all fonts residing on your system, possibly including fonts that cannot be used because they are bitmapped. You can instead use the uisetfont utility (a GUI) to preview fonts you might want to use; it only displays fonts that can be rendered in MATLAB figures and GUIs. Like uisetfont, the Custom Fonts pane of MATLAB Preferences also previews available fonts and only shows those that can be rendered.
This example returns a list of available system fonts similar in format to the one shown.
list = listfonts
list =
'Agency FB'
'Algerian'
'Arial'
...
'ZapfChancery'
'ZapfDingbats'
'ZWAdobeF'This example returns a list of available system fonts with the value of theFontName property, for the object with handle h, sorted into the list.
h = uicontrol('Style','text','String','My Font','FontName','MyFont');
list = listfonts(h)
list =
'Agency FB'
'Algerian'
'Arial'
...
'MyFont'
...
'ZapfChancery'
'ZapfDingbats'
'ZWAdobeF'

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |