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 theFontName
property of the object with handleh
.
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 handleh
,包括和排序的列表中。
h = uicontrol('Style','text','String',...'My Font','FontName','MyFont'); list = listfonts(h)
list = 'Agency FB' 'Algerian' 'Arial' ... 'MyFont' ... 'ZapfChancery' 'ZapfDingbats' 'ZWAdobeF'
Tips
Callinglistfonts
returns a list of all fonts on your system, possibly including fonts that you cannot use with MATLAB®.Consider using theuisetfont
function to preview fonts that MATLAB can render in figure windows. Likeuisetfont
,Custompane under theFontssection of MATLAB Preferences also previews available fonts and only shows those that MATLAB can render.