Next / Previous / Contents / Shipman's homepage

6.22. font()

font(**kw)

This function returns a dictionary of attributes that can be applied to a block or inline element to specify the text font characteristics. Attribute names are de-camelized as described in Section 5.1, “Dashing from camelCase. The six attribute names in their camel-case forms are:

fontFamily Font family, e.g., "Times" or "sans-serif".
fontSize Font size, e.g., '11pt'.
fontStyle Font style: 'italic', 'normal', or 'oblique'.
fontWeight Font weight, e.g., 'bold' or 'normal'.
fontVariant Font variant, e.g., 'small-caps'.
fontStretch Amount to stretch the font, e.g., 'ultra-condensed', 'expanded', or 'semi-condensed'.