GeoScript

Previous topic

Label

Next topic

Hatch

This Page

Font

class geoscript.style.font.Font

Symbolizer for label font.

A font consists of a style (normal, italic, or oblique), a weight (normal or bold), a size, and a font family. A font can be constructed by specifying any number of these properties:

>>> Font(style='italic', weight='bold', size=10, family='Arial')
Font(style=italic,weight=bold,size=10,family=Arial)

A font may also be constructed from a CSS like string that specifies the attribute values in order.

>>> Font('italic bold 12px "Times New Roman"')
Font(style=italic,weight=bold,size=12,family=Times New Roman)

If the font family contains spaces, it should be surrounded in quotes. Multiple values for font family may also be specified to form provide fallback values.

>>> Font('"Times New Roman", Arial, serif')
Font(style=normal,weight=normal,size=10,family=Times New Roman,Arial,serif)
static list()

Returns a generator of all available Font names.