show_fonts

show_fonts(*args, family=None, user=None, text=None, math=False, fallback=False, **kwargs)[source]

Generate a table of fonts. If a glyph for a particular font is unavailable, it is replaced with the “¤” dummy character.

Parameters
  • *args (str or FontProperties) – The font specs, font names, or FontPropertiess to show. If no positional arguments are passed and the family argument is not passed, then the fonts found in user_folder and local_folders and the available rc['font.sans-serif'] fonts are shown.

  • family ({'tex-gyre', 'sans-serif', 'serif', 'monospace', 'cursive', 'fantasy'}, optional) – The family from which available fonts are shown. Default is 'sans-serif' if no arguments were provided. Otherwise the default is to not show family fonts. The fonts belonging to each family are listed under rc['font.serif'], rc['font.sans-serif'], rc['font.monospace'], rc['font.cursive'], and rc['font.fantasy']. The special family 'tex-gyre' includes the TeX Gyre fonts.

  • user (bool, optional) – Whether to include fonts in user_folder and local_folders at the top of the table. Default is True if called without any arguments and False otherwise.

  • text (str, optional) – The sample text shown for each font. If not passed then default math or non-math sample text is used.

  • math (bool, default: False) – Whether the default sample text should show non-math Latin characters or or math equations and Greek letters.

  • fallback (bool, default: False) – Whether to use the fallback font rc['mathtext.fallback'] for unavailable characters. If False the dummy glyph “¤” is shown for missing characters.

  • **kwargs – Additional font properties passed to FontProperties. Default size is 12 and default weight, style, and strength are 'normal'.

Other Parameters
  • size (float, default: 12) – The font size.

  • weight (str, default: 'normal') – The font weight.

  • style (str, default: 'normal') – The font style.

  • stretch (str, default: 'normal') – The font stretch.

Returns