DefaultFontProperties

DefaultFontProperties

is a global option that allows overriding properties of specified font families.

Details

  • DefaultFontProperties accepts a list of rules, with each rule having the form "family"{"prop1"val1,"prop2"val2,}. "family" is the name of a font family being configured and the "propi" are the properties being assigned to that font.
  • The following values of "propi" can be given:
  • "FontMonospaced"whether the front end should recognize the font as monospaced for internal purposes
    "FontSerifed"whether the front end should recognize the font as serifed for internal purposes
    "WolframFont"the name of the Wolfram-provided symbols font that should be matched to this font
  • "FontMonospaced" and "FontSerifed" can take values of True or False, while "WolframFont" takes a string with the family name of the Wolfram font that should be used for mathematical and technical symbols.
  • If "WolframFont" is not specified, then "FontMonospace" and "FontSerifed" will be used to determine the default Wolfram font to use.
  • Typically, the notebook front end will automatically recognize whether a font is monospaced or serifed and choose an appropriate Wolfram font to match to the font automatically. DefaultFontProperties is generally used when the font metadata is wrong, or when you want to customize the Wolfram font setting.
  • Fonts that can be used for the "WolframFont" setting include:
  • "Mathematica"a proportional, serifed font
    "MathematicaMono"a monospaced, serifed font
    "MathematicaSans"a proportional, sans-serif font
    "Wolfram Modern"a monospaced, sans-serif font
  • Aside from the noted differences, there are other stylistic differences between the various Wolfram fonts. For example, "MathematicaMono" was designed to be paired with the Courier typeface and tends to have narrower strokes in its character set.

Examples

Basic Examples  (2)

Display the default value for DefaultFontProperties:

Rasterize an example of the default display for Inconsolata:

Set Inconsolata to use Wolfram Modern as the "WolframFont" in the current session:

Rasterize the same example with the new setting:

Restore the session defaults:

Wolfram Research (1999), DefaultFontProperties, Wolfram Language function, https://reference.wolfram.com/language/ref/DefaultFontProperties.html (updated 2023).

Text

Wolfram Research (1999), DefaultFontProperties, Wolfram Language function, https://reference.wolfram.com/language/ref/DefaultFontProperties.html (updated 2023).

CMS

Wolfram Language. 1999. "DefaultFontProperties." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/DefaultFontProperties.html.

APA

Wolfram Language. (1999). DefaultFontProperties. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DefaultFontProperties.html

BibTeX

@misc{reference.wolfram_2024_defaultfontproperties, author="Wolfram Research", title="{DefaultFontProperties}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/DefaultFontProperties.html}", note=[Accessed: 23-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_defaultfontproperties, organization={Wolfram Research}, title={DefaultFontProperties}, year={2023}, url={https://reference.wolfram.com/language/ref/DefaultFontProperties.html}, note=[Accessed: 23-April-2024 ]}