Font

class wellcad.com.Font(dispatch)

This class encapsulates the properties of fonts used throughout WellCAD

For example, fonts can be specified in the following places:

  • Comment log

  • Comment partition

  • Property partition

  • Log title

In general, attributes of this class reflect those of the LOGFONT structure in the Win32 API. Documentation for this structure can be found here.

Example

>>> log = borehole.log("Comments")
>>> font = log.font
>>> font.name
'Arial Narrow'
>>> font.italic
False
property bold

Whether the font is bold.

Type:

bool

property charset

The index of the character set used.

The character set can be selected from a list of available values documented in the Win32 LOGFONT documentation).

Type:

int

property italic

Whether the font is italicized.

Type:

bool

property name

The name of the font type used.

Type:

str

property size

The size of the font.

See the Win32 LOGFONT documentation for more of an explanation.

Type:

int

property strikethrough

Whether the font is struck through.

Type:

bool

property underline

Whether the font is underlined.

Type:

bool

property weight

The weight (boldness) of the font used.

Values typically range from 100 to 900 where 400 is regular weight and 700 is bold.

Type:

int