ooodev.format.writer.modify.char.font package

Module contents

class ooodev.format.writer.modify.char.font.FontEffects(*, color=None, transparency=None, overline=None, underline=None, strike=None, word_mode=None, case=None, relief=None, outline=None, hidden=None, shadowed=None, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Bases: CharStyleBaseMulti

Character Style Font Effects

New in version 0.9.0.

__init__(*, color=None, transparency=None, overline=None, underline=None, strike=None, word_mode=None, case=None, relief=None, outline=None, hidden=None, shadowed=None, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Constructor

Parameters:
  • color (Color, optional) – The value of the text color. If value is -1 the automatic color is applied.

  • transparency (Intensity, int, optional) – The transparency value from 0 to 100 for the font color.

  • overline (FontLine, optional) – Character overline values.

  • underline (FontLine, optional) – Character underline values.

  • strike (FontStrikeoutEnum, optional) – Determines the type of the strike out of the character.

  • word_mode (bool, optional) – If True, the underline and strike-through properties are not applied to white spaces.

  • case (CaseMapEnum, optional) – Specifies the case of the font.

  • relief (FontReliefEnum, optional) – Specifies the relief of the font.

  • outline (bool, optional) – Specifies if the font is outlined.

  • hidden (bool, optional) – Specifies if the font is hidden.

  • shadowed (bool, optional) – Specifies if the characters are formatted and displayed with a shadow effect.

  • style_name (StyleParaKind, str, optional) – Specifies the Character Style that instance applies to. Default is Default Character Style.

  • style_family (str, optional) – Style family. Default CharacterStyles.

Return type:

None

classmethod from_style(doc, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (StyleCharKind, str, optional) – Specifies the Character Style that instance applies to. Default is Default Character Style.

  • style_family (str, optional) – Style family. Default CharacterStyles.

Returns:

FontEffects instance from document properties.

Return type:

FontEffects

property prop_inner: FontEffects

Gets/Sets Inner Font Effects instance

Return type:

FontEffects

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str

class ooodev.format.writer.modify.char.font.FontOnly(*, name=None, size=None, font_style_name=None, lang=None, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Bases: CharStyleBaseMulti

Character Style Font

New in version 0.9.0.

__init__(*, name=None, size=None, font_style_name=None, lang=None, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Constructor

Parameters:
  • name (str, optional) – This property specifies the name of the font style. It may contain more than one name separated by comma.

  • size (float, UnitT, optional) – This value contains the size of the characters in pt (point) units or Class UnitT.

  • font_style_name (str, optional) – Font style name such as Bold.

  • lang (Lang, optional) – Font Language

  • shadowed (bool, optional) – Specifies if the characters are formatted and displayed with a shadow effect.

  • style_name (StyleParaKind, str, optional) – Specifies the Character Style that instance applies to. Default is Default Character Style.

  • style_family (str, optional) – Style family. Default CharacterStyles.

Return type:

None

classmethod from_style(doc, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (StyleCharKind, str, optional) – Specifies the Character Style that instance applies to. Default is Default Character Style.

  • style_family (str, optional) – Style family. Default CharacterStyles.

Returns:

FontOnly instance from document properties.

Return type:

FontOnly

property prop_inner: FontOnly

Gets/Sets Inner Font instance

Return type:

FontOnly

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str

class ooodev.format.writer.modify.char.font.FontPosition(*, script_kind=None, raise_lower=None, rel_size=None, rotation=None, scale=None, fit=None, spacing=None, pair=None, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Bases: CharStyleBaseMulti

Character Style Font Effects

New in version 0.9.0.

__init__(*, script_kind=None, raise_lower=None, rel_size=None, rotation=None, scale=None, fit=None, spacing=None, pair=None, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Constructor

Parameters:
  • script_kind (FontScriptKind, optional) – Specifies Superscript/Subscript option.

  • raise_lower (int, optional) – Specifies raise or Lower as percent value. Set to a value of 0 for automatic.

  • rel_size (int, Intensity, optional) – Specifies relative Font Size as percent value. Set this value to 0 for automatic; Otherwise value from 1 to 100.

  • rotation (int, Angle, optional) – Specifies the rotation of a character in degrees. Depending on the implementation only certain values may be allowed.

  • scale (int, optional) – Specifies scale width as percent value. Min value is 1.

  • fit (bool, optional) – Specifies if rotation is fit to line.

  • spacing (CharSpacingKind, float, UnitT, optional) – Specifies character spacing in pt (point) units or Class UnitT.

  • pair (bool, optional) – Specifies pair kerning.

  • style_name (StyleCharKind, str, optional) – Specifies the Character Style that instance applies to. Default is Default Character Style.

  • style_family (str, optional) – Style family. Default CharacterStyles.

Return type:

None

classmethod from_style(doc, style_name=StyleCharKind.STANDARD, style_family='CharacterStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (StyleParaKind, str, optional) – Specifies the Character Style that instance applies to. Default is Default Character Style.

  • style_family (str, optional) – Style family. Default CharacterStyles.

Returns:

FontPosition instance from document properties.

Return type:

FontPosition

property prop_inner: FontPosition

Gets/Sets Inner Font Position instance

Return type:

FontPosition

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str