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.

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

  


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