Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

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.

Remarks

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS