ITextStyle

class ITextStyle

Bases: ImpactCOMWrapperBase

Description:

Represents a text style.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property angle

Gets Angle.

Description:

Gets and sets the angle of the text.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of Angle.

Return type:

angle (float)

property auto_format_fractions

Gets auto_format_fractions.

Description:

Gets and sets whether fractions are auto-formatted.

Remarks:

Introduced in Impact 10.0.0.56

Returns:

The value of auto_format_fractions.

Return type:

auto_format_fractions (bool)

property average_width

Gets average_width.

Description:

Gets and sets the average width of the characters in the text.

Remarks:

This property is relevant for only line ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine.

Returns:

The value of average_width.

Return type:

average_width (float)

property char_spacing

Gets char_spacing.

Description:

Gets and sets the spacing of the characters.

Remarks:

The character spacing is a real number with the following special cases: 0.0 - normal spacing (used by Impact 2015 and earlier).-1.0 - fully condensed, with no spacing, characters all drawn on top of each other.1.0 - expanded, with double the normal spacing between characters. Any real value between -1.0 and +infinity can be used, with negative numbers condensing and positive numbers expanding. Introduced in Impact 10.0.0.56

Returns:

The value of char_spacing.

Return type:

char_spacing (float)

property font

Gets Font.

Description:

Gets and sets the font that the text is displayed in.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of Font.

Return type:

font (IFont)

property font_style

Gets font_style.

Description:

Gets and sets the font style of the text.

Remarks:

This property is relevant for only true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftTrueType.

Returns:

The value of font_style.

Return type:

font_style (ipFontStyle)

property height

Gets Height.

Description:

Gets and sets the height of the text.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of Height.

Return type:

height (float)

property justification

Gets Justification.

Description:

Gets and sets the justification mode.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of Justification.

Return type:

justification (ipTextJustification)

property leading

Gets Leading.

Description:

Inidcates if the text is leading or not.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of Leading.

Return type:

leading (float)

property mirror_x

Gets mirror_x.

Description:

Gets and sets the mirrored state in the X direction.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of mirror_x.

Return type:

mirror_x (bool)

property mirror_y

Gets mirror_y.

Description:

Gets and sets the mirrored state in the Y direction.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of mirror_y.

Return type:

mirror_y (bool)

property orientation

Gets Orientation.

Description:

Gets and sets the orientation mode.

Remarks:

This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of Orientation.

Return type:

orientation (ipTextOrientation)

property outline

Gets Outline.

Description:

Gets and sets if the text is outlined.

Remarks:

This property is relevant for only true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftTrueType.

Returns:

The value of Outline.

Return type:

outline (bool)

property shear

Gets Shear.

Description:

Gets and sets the shear of the text.

Remarks:

This property is relevant for only line ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine.

Returns:

The value of Shear.

Return type:

shear (float)

property single_stroke

Gets single_stroke.

Description:

Gets and sets if the text is displayed with single strokes (used for “stick fonts” only)

Remarks:

Some fonts are designed specifically for CAD/CAM, any text needs this property to be set in order to be drawn correctly. Introduced in Impact 9.0.0.89.

Returns:

The value of single_stroke.

Return type:

single_stroke (bool)

property strikethrough

Gets Strikethrough.

Description:

Gets and sets if the text has a strikethrough line.

Remarks:

This property is relevant for only true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftTrueType.

Returns:

The value of Strikethrough.

Return type:

strikethrough (bool)

property style_sheet

Gets style_sheet.

Description:

Gets the text stye sheet associated with this text style.

Remarks:

If this text style is not based upon a text style sheet this property will return NULL.

Returns:

The value of style_sheet.

Return type:

style_sheet (ITextStyleSheet)

property tracking

Gets Tracking.

Description:

Gets and sets the tracking of the text.

Remarks:

This property is relevant for only line ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine.

Returns:

The value of Tracking.

Return type:

tracking (float)

property underline

Gets Underline.

Description:

Gets and sets if the text is underlined.

Remarks:

This property is relevant for only true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftTrueType.

Returns:

The value of Underline.

Return type:

underline (bool)

property vertical_text

Gets vertical_text.

Description:

Gets and sets the Vertical state of the text style.

Remarks:

Introduced in 13.0.0.49 This property is relevant for both line and true type ITextStyle objects, i.e. the Font property has a font_type property equal to ftLine or ftTrueType.

Returns:

The value of vertical_text.

Return type:

vertical_text (bool)

property width

Gets Width.

Description:

Gets and sets the width mode.

Remarks:

This property is relevant for only line fonts, not True Type fonts. In other words, if the Font property has a font_type property equal to ftLine. To modify the width value of line font characters, you should set the average_width property (because of course each character’s width may be different). For True Type characters, the character width is determined by the Height.

Returns:

The value of Width.

Return type:

width (ipTextWidth)