ooodev.format.inner.direct.write.char.font.font_effects module
Module for managing character fonts.
New in version 0.9.0.
- class ooodev.format.inner.direct.write.char.font.font_effects.FontEffects(*, color=None, transparency=None, overline=None, underline=None, strike=None, word_mode=None, case=None, relief=None, outline=None, hidden=None, shadowed=None)[source]
Bases:
StyleBase
Character Font Effects
Any properties starting with
prop_
set or get current instance values.All methods starting with
fmt_
can be used to chain together font properties.Many properties can be chained together.
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)[source]
Font options used in styles.
- 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
to100
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.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj: Any, **kwargs)
- apply(obj, **kwargs)
Applies styles to object
- Parameters:
obj (object) – UNO object that has supports
com.sun.star.style.CharacterProperties
service.kwargs (Any) –
- Return type:
None
- fmt_case(value=None)[source]
Gets copy of instance with case set or removed.
- Parameters:
value (CaseMapEnum, optional) – The case value. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_color(value=None)[source]
Gets copy of instance with text color set or removed.
- Parameters:
value (
Color
, optional) – The text color. IfNone
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
Gets copy of instance with hidden set or removed.
- Parameters:
value (bool, optional) – The hidden value. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_outline(value=None)[source]
Gets copy of instance with outline set or removed.
- Parameters:
value (bool, optional) – The outline value. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_overline(value=None)[source]
Gets copy of instance with overline set or removed.
- Parameters:
value (FontUnderlineEnum, optional) – The size of the characters in point units. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_overline_color(value=None)[source]
Gets copy of instance with text overline color set or removed.
- Parameters:
value (
Color
, optional) – The color is used for an overline. IfNone
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_relief(value=None)[source]
Gets copy of instance with relief set or removed.
- Parameters:
value (FontReliefEnum, optional) – The relief value. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_shadowed(value=None)[source]
Gets copy of instance with shadowed set or removed.
- Parameters:
value (bool, optional) – The shadowed value. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_strike(value=None)[source]
Gets copy of instance with strike set or removed.
- Parameters:
value (FontStrikeoutEnum, optional) – The type of the strike out of the character. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_transparency(value=None)[source]
Gets copy of instance with text background transparency set or removed.
- Parameters:
value (bool, optional) – The text background transparency. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_underline(value=None)[source]
Gets copy of instance with underline set or removed.
- Parameters:
value (FontUnderlineEnum, optional) – The value for the character underline. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_underline_color(value=None)[source]
Gets copy of instance with text underline color set or removed.
- Parameters:
value (
Color
, optional) – The color is used for an underline. IfNone
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- fmt_word_mode(value=None)[source]
Gets copy of instance with word mode set or removed.
The underline and strike-through properties are not applied to white spaces when set to
True
.- Parameters:
value (bool, optional) – The word mode. If
None
style is removed. DefaultNone
self (_TFontEffects) –
- Returns:
Font with style added or removed
- Return type:
- classmethod from_obj(obj)[source]
- classmethod from_obj(obj, **kwargs)
- classmethod from_obj(obj, **kwargs)
Gets instance from object
- Parameters:
obj (object) – UNO object.
- Raises:
NotSupportedError – If
obj
is not supported.- Returns:
FontEffects
instance that representsobj
font effects.- Return type:
- property case_lower: _TFontEffects
Gets copy of instance with case set to lower
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property case_none: _TFontEffects
Gets copy of instance with no case set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property case_small_caps: _TFontEffects
Gets copy of instance with case set to small caps
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property case_title: _TFontEffects
Gets copy of instance with case set to title
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property case_upper: _TFontEffects
Gets copy of instance with case set to upper
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property color_auto: _TFontEffects
Gets copy of instance with color set to automatic
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property default: _TFontEffects
Gets Font Position default.
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
Gets copy of instance with hidden set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property outline: _TFontEffects
Gets copy of instance with outline set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property overline: _TFontEffects
Gets copy of instance with overline set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property overline_color_auto: _TFontEffects
Gets copy of instance with overline color set to automatic
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property prop_case: CaseMapEnum | None
Gets/Sets Font Case Value
- Return type:
CaseMapEnum | None
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
Gets/Sets if the font is hidden
- Return type:
bool | None
- property prop_outline: bool | None
Gets/Sets if the font is outlined
- Return type:
bool | None
- property prop_overline: FontLine
This property contains the value for the character overline.
- Return type:
- property prop_relief: FontReliefEnum | None
Gets/Sets Font Relief Value
- Return type:
FontReliefEnum | None
- property prop_shadowed: bool | None
Gets/Sets if the characters are formatted and displayed with a shadow effect.
- Return type:
bool | None
- property prop_strike: FontStrikeoutEnum | None
Gets/Sets the type of the strike out of the character.
- Return type:
FontStrikeoutEnum | None
- property prop_transparency: Intensity | None
Gets/Sets The transparency value
- Return type:
Intensity | None
- property prop_underline: FontLine
This property contains the value for the character underline.
- Return type:
- property prop_word_mode: bool | None
Gets/Sets Character word mode. If this property is
True
, the underline and strike-through properties are not applied to white spaces.- Return type:
bool | None
- property relief_embossed: _TFontEffects
Gets copy of instance with relief set to embossed
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property relief_engraved: _TFontEffects
Gets copy of instance with relief set to engraved
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property relief_none: _TFontEffects
Gets copy of instance with no relief set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property shadowed: _TFontEffects
Gets copy of instance with shadow set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property strike: _TFontEffects
Gets copy of instance with strike set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property under_color_auto: _TFontEffects
Gets copy of instance with underline color set to automatic
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property underline: _TFontEffects
Gets copy of instance with underline set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- property word_mode: _TFontEffects
Gets copy of instance with word mode set
- Return type:
TypeVar
(_TFontEffects
, bound= FontEffects)
- class ooodev.format.inner.direct.write.char.font.font_effects.FontLine(line=None, color=None)[source]
Bases:
object
Font Line such as overline and underline.
- Parameters:
line (FontUnderlineEnum | None) –
color (Color | None) –
- __init__(line=None, color=None)[source]
Constructor
- Parameters:
line (FontUnderlineEnum, optional) – Font Line kind.
color (
Color
, optional) – Line color. If value is-1
the automatic color is applied.
- Return type:
None
- property line: FontUnderlineEnum | None
Gets/Sets line.
- Return type:
FontUnderlineEnum | None