ooodev.adapter.awt.font_descriptor_struct_comp module

class ooodev.adapter.awt.font_descriptor_struct_comp.FontDescriptorStructComp(component, prop_name, event_provider=None)[source]

Bases: StructBase[FontDescriptor]

Font Descriptor Struct

This class raises an event before and after a property is changed if it has been passed an event provider.

The event raised before the property is changed is called com_sun_star_awt_FontDescriptor_changing. The event raised after the property is changed is called com_sun_star_awt_FontDescriptor_changed.

The event args for before the property is changed is of type KeyValCancelArgs. The event args for after the property is changed is of type KeyValArgs.

__init__(component, prop_name, event_provider=None)[source]

Constructor

Parameters:
  • component (FontDescriptor) – Font Descriptor.

  • prop_name (str) – Property Name. This value is assigned to the prop_name of event_data.

  • event_provider (EventsPartial | None) – Event Provider.

Return type:

None

property char_set: CharSetEnum

Gets/Sets the character set which is supported by the font.

When setting the value, the value can be an integer or a CharSetEnum object.

Hint

  • CharSetEnum can be imported from ooo.dyn.awt.char_set.

Return type:

CharSetEnum

property character_width: float

Gets/Sets the character width.

Depending on the specified width, a font that supports this width may be selected.

The value is expressed as a percentage.

Return type:

float

property family: FontFamilyEnum

Gets/Sets the general style of the font.

When setting the value, the value can be an integer or a FontFamilyEnum object.

Hint

  • FontFamilyEnum can be imported from oo.dyn.awt.font_family.

Return type:

FontFamilyEnum

property height: int

Gets/Sets the height of the font in the measure of the destination.

Return type:

int

property kerning: bool

For requesting, it specifies if there is a kerning table available.

For selecting, it specifies if the kerning table is to be used.

Return type:

bool

property name: str

Gets/Sets the exact name of the font.

Return type:

str

property orientation: Angle10

Gets/Sets the rotation of the font.

The unit of measure is 1/10 degrees; 0 is the baseline.

When setting the value, the value can be an float in 1/10 degrees or an Angle10 object.

Returns:

Rotation of the font.

Return type:

Angle10

property pitch: FontPitchEnum

Gets/Sets the pitch of the font.

When setting the value, the value can be an integer or a FontPitchEnum object.

Hint

  • FontPitchEnum can be imported from ooo.dyn.awt.font_pitch.

Return type:

FontPitchEnum

property slant: FontSlant

Gets/Sets the slant of the font.

Hint

  • FontSlant is a ooo.dyn.awt.font_slant.

Return type:

FontSlant

property strikeout: FontStrikeoutEnum

Gets/Sets the kind of strikeout.

When setting the value, the value can be an integer or a FontStrikeoutEnum object.

Hint

  • FontStrikeoutEnum can be imported from ooo.dyn.awt.font_strikeout.

Return type:

FontStrikeoutEnum

property style_name: str

Gets/Sets the style name of the font.

Return type:

str

property type: FontTypeEnum

Gets/Sets the technology of the font representation. Flags Enum.

One or more values out of the constant group com.sun.star.awt.FontType can be combined by an arithmetical or-operation.

When setting the value, the value can be an integer or a FontTypeEnum object.

Hint

  • FontTypeEnum can be imported from ooo.dyn.awt.font_type.

Return type:

FontTypeEnum

property underline: FontUnderlineEnum

Gets/Sets the kind of underlining.

When setting the value, the value can be an integer or a FontUnderlineEnum object.

Hint

FontUnderlineEnum can be imported from ooo.dyn.awt.font_underline.

Return type:

FontUnderlineEnum

property weight: float

Gets/Sets the thickness of the line.

Depending on the specified weight, a font that supports this thickness may be selected.

The value is expressed as a percentage. 150.0 usually means bold.

Return type:

float

property width: int

Gets/Sets the width of the font in the measure of the destination.

Return type:

int

property word_line_mode: bool

Gets/Sets if only words get underlined.

True means that only non-space characters get underlined, False means that the spacing also gets underlined.

This property is only valid if the property com.sun.star.awt.FontDescriptor.Underline is not FontUnderline.NONE.

Return type:

bool