Skip to Main Content Skip to Search
Product Documentation

listfonts - List available system fonts

Syntax

c = listfonts
c = listfonts(h)

Description

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.

Tips

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.

Examples

Example 1

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'

Example 2

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'

See Also

uisetfont

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS