Text¶
Add bodies of text and the containers that hold them, and set their paragraph and character properties.
Text¶
-
class creator_studio_doc_format.core.Text(*, preset_identifier=
'', paragraphs=None, string=None, text_runs=None, **extra_data)[source]¶ A body of text, such as the text of a text box, a table cell, or a slide’s presenter notes.
It’s carried in exactly one of these forms. The text-run form is accepted when supplying text, but Keynote always writes text as paragraphs or a plain string.
-
field string : str | None =
None¶ A string of Unicode text.
-
field string : str | None =
TextRun¶
-
class creator_studio_doc_format.core.TextRun(*, preset_identifier=
'', string, style=None, **extra_data)[source]¶ A run of text with a single character style.
- field string : str [Required]¶
The literal text of this run, shown in the run’s character style. It may be empty. A run is split wherever the character style changes, so the text of a run always has a single style.
-
field style : CharacterProperties | None =
None¶ The character properties for this run. When
preset_identifieris set, the run inherits from a stylesheet character style; otherwise, the properties are written in the run itself.
TextStroke¶
-
class creator_studio_doc_format.core.TextStroke(*, preset_identifier=
'', none=None, stroke=None, **extra_data)[source]¶ A stroke for text, or a special value for no stroke.
-
field none : Literal[True] | None =
None¶ No stroke.
-
field none : Literal[True] | None =
Textbox¶
-
class creator_studio_doc_format.core.Textbox(*, preset_identifier=
'', identifier=None, geometry=None, aspect_ratio_locked=False, description=None, title=None, title_is_positioned_on_top=True, caption=None, fill=None, stroke=Stroke(line=Line()), opacity=1, shadow=Override.not_set(), reflection=None, layout_properties=None, paragraph_properties=None, text=None, **extra_data)[source]¶ A container for text that someone places directly on a slide or slide layout.
It takes its typography and background from the text-box presets rather than the shape presets. A
shapecan hold text too.-
field identifier : str | None =
None¶ An identifier for this object that other objects use to refer to it. This identifier must be unique across the whole document.
-
field geometry : Geometry | None =
None¶ The object’s position and size. If this value is absent, Keynote places the object automatically, with a default position and size for its kind.
-
field aspect_ratio_locked : bool =
False¶ A Boolean value that indicates whether the object’s width-to-height ratio is locked when the object resizes. The lock doesn’t constrain the
geometryproperty. If this property is absent, images, movies, and groups default totrue, and other objects tofalse.
-
field description : str | None =
None¶ The accessibility description for the object, read aloud by assistive technologies such as VoiceOver.
-
field title_is_positioned_on_top : bool =
True¶ When
true, the title appears above the object; whenfalse, the title appears below the object, above the caption if there is one. Defaults totrue. Keynote ignores this when the object has none, or when it’s hidden withLabel.is_visibleset tofalse; Keynote places a hidden title above the object, where it appears when it shows again.
-
field caption : Label | None =
None¶ The object’s caption, which Keynote always places below the object. If a caption is off, you still write it out with
Label.is_visibleset tofalse, so having a value doesn’t mean the caption shows.
-
field fill : Fill | None =
None¶ The fill inside the text box. If absent, the fill from the text box’s preset style is used.
-
field opacity : float =
1¶ The text box’s opacity, in the range
0to1.
-
field reflection : Reflection | None =
None¶ The reflection shown for the text box.
-
field layout_properties : LayoutProperties | None =
None¶ Layout overrides, such as insets and columns, for the text box’s text.
-
field paragraph_properties : ParagraphProperties | None =
None¶ Paragraph-level style, such as alignment and spacing, for the text box’s text.
-
field identifier : str | None =
Paragraph¶
-
class creator_studio_doc_format.core.Paragraph(*, preset_identifier=
'', style=None, list_style=None, list_start=None, list_level=None, writing_direction=None, contents=None, break_type=None, **extra_data)[source]¶ A paragraph of text.
-
field style : ParagraphProperties | None =
None¶ The paragraph properties for this paragraph. When
preset_identifieris set, the paragraph inherits from a stylesheet paragraph style; otherwise, the properties are given here.
-
field list_style : ListProperties | None =
None¶ The list properties for this paragraph. When
preset_identifieris set, the paragraph inherits from a stylesheet list style; otherwise, the properties are given here. Iflist_styleis absent, the paragraph keeps the list style already in effect (the preceding paragraph’s, or the one the containing text starts with), so ending a list takes an explicit list style whose levels carry no label.
-
field list_start : int | None =
None¶ The number at which list numbering restarts for this paragraph. If it’s omitted or 0, numbering continues from the preceding list item. Values above 4294967295 are clamped.
-
field list_level : int | None =
None¶ The zero-based list level of the paragraph, where
0is the top level; if it’s absent, the level is 0. The level selects which entry of the list style’sListProperties.levelssupplies the indent and the label. Levels outside the range0through 8 are adjusted to the nearest supported level rather than rejected.
-
field writing_direction : WritingDirectionType | None =
None¶ The writing direction of the paragraph, used only when the paragraph style leaves the direction natural. A direction on the paragraph style takes precedence, and the document’s direction applies when neither sets one.
-
field contents : list[Constituent] | None =
None¶ The ordered contents of the paragraph: text runs, inline objects, and links. The break that ends the paragraph isn’t included, and the property is omitted for an empty paragraph.
-
field style : ParagraphProperties | None =
Constituent¶
-
class creator_studio_doc_format.core.Constituent(*, preset_identifier=
'', hyperlink=None, inline_object=None, run=None, **extra_data)[source]¶ An element of a paragraph’s contents.
Each element is a run of text, an inline object, or a link.
-
field hyperlink : HyperlinkField | None =
None¶ A link.
-
field inline_object : CanvasObject | None =
None¶ An inline object.
An object that can’t be imported (for example, a movie the device can’t play) isn’t dropped on its own. In the text of a text box or shape, the whole text box or shape is removed, including all of its text; in a slide’s presenter notes, such an object stops the document from loading.
-
field hyperlink : HyperlinkField | None =
HyperlinkField¶
-
class creator_studio_doc_format.core.HyperlinkField(*, preset_identifier=
'', target, run, **extra_data)[source]¶ A link with styled display text.
BreakType¶
- class creator_studio_doc_format.core.BreakType(str, Enum)[source]¶
The break that ends a paragraph.
It decides where the following text resumes: the next line, the next column, or the next page.
A field accepts a member or its value, so
BreakType.COLUMNand'column'are the same. The member’s name as a string isn’t accepted.-
COLUMN =
'column'¶ Column break.
-
NONE =
'none'¶ No terminating break; only the last paragraph of the text can lack one, and there
noneis equivalent to omittingbreak_type. On any earlier paragraph a normal paragraph break is inserted instead.
-
NONTOPIC =
'nontopic'¶ A paragraph break that prevents topic or list labeling.
-
PAGE =
'page'¶ Page break.
-
PARA =
'para'¶ Paragraph break.
-
SECTION =
'section'¶ Section break. Keynote has no sections:
sectionis always replaced by a page break, which in Keynote only ends the paragraph. Useparainstead.
-
COLUMN =
ParagraphProperties¶
-
class creator_studio_doc_format.core.ParagraphProperties(*, preset_identifier=
'', alignment=Override.not_set(), decimal_tab=Override.not_set(), default_tabs=Override.not_set(), fill=Override.not_set(), first_line_indent=Override.not_set(), following_style=Override.not_set(), hyphenate=Override.not_set(), list_style=Override.not_set(), keep_lines_together=Override.not_set(), keep_with_next=Override.not_set(), left_indent=Override.not_set(), line_spacing=Override.not_set(), outline_level=Override.not_set(), start_on_new_page=Override.not_set(), borders=None, right_indent=Override.not_set(), space_after=Override.not_set(), space_before=Override.not_set(), tabs=Override.not_set(), prevent_widow=Override.not_set(), show_in_bookmarks=Override.not_set(), show_in_tocnavigator=Override.not_set(), character_properties=None, **extra_data)[source]¶ The paragraph-level properties of text.
A
preset_identifierhere is matched against the document stylesheet’s paragraph styles before the presets inpresets.json, and an identifier that matches neither is silently ignored. An omitted property is inherited from that preset and its parent presets, or from the style these properties refine, such as a table region’s text style; anullclears it instead.bordersandcharacter_propertiesdon’t accept anull.-
field alignment : Override[AlignmentType] =
Override.not_set()¶ The horizontal alignment of the paragraph.
-
field decimal_tab : Override[str] =
Override.not_set()¶ The character that text lines up on at a decimal tab stop, such as
.or,. The default is the decimal separator of the document’s language.
-
field default_tabs : Override[float] =
Override.not_set()¶ The distance, in points, between the automatic tab stops that apply where no explicit stop from
tabsis defined.
-
field first_line_indent : Override[float] =
Override.not_set()¶ The indentation, in points, of the paragraph’s first line, if it differs from the rest. It’s the left indent for left-to-right paragraphs and the right indent for right-to-left paragraphs, and it replaces
left_indenton that line rather than adding to it, so a smaller value gives a hanging indent.
-
field following_style : Override[str] =
Override.not_set()¶ The identifier or name of the paragraph style applied to the next paragraph created after this one, such as a body style following a heading. It’s matched first against the identifiers of the styles in the document’s stylesheet (a stylesheet entry’s
preset_identifier), and then against style names. A value matching neither is ignored.
-
field hyphenate : Override[bool] =
Override.not_set()¶ Whether to allow long words in the paragraph to be hyphenated at line breaks. Hyphenation also requires document-wide hyphenation to be on and never happens in right-to-left paragraphs, so
falsesuppresses hyphenation for the paragraph whiletruecan’t introduce it.
-
field list_style : Override[str] =
Override.not_set()¶ The identifier or name of the list style that text using this paragraph style starts with, matched against list-style identifiers first, then names. A stylesheet list style’s identifier is normally its
preset_identifier.nullmeans no list style, and a value matching no identifier and no name is ignored.
-
field keep_lines_together : Override[bool] =
Override.not_set()¶ Whether to keep all of the paragraph’s lines on the same page, if possible.
-
field keep_with_next : Override[bool] =
Override.not_set()¶ Whether to keep all of the paragraph’s lines on the same page as the next paragraph, if possible.
-
field left_indent : Override[float] =
Override.not_set()¶ The indentation, in points, of the paragraph’s left edge from the left edge of the text column.
-
field line_spacing : Override[LineSpacingType] =
Override.not_set()¶ The line spacing rule and amount for the paragraph.
-
field outline_level : Override[int] =
Override.not_set()¶ The depth of the paragraph in the document outline, where
0is the top level. Use-1for body text that isn’t part of the outline; values outside the range-1to999are clamped.
-
field start_on_new_page : Override[bool] =
Override.not_set()¶ Whether the paragraph starts on a new page.
-
field borders : BorderStyleType | None =
None¶ The paragraph’s border or rule style.
-
field right_indent : Override[float] =
Override.not_set()¶ The indentation, in points, of the paragraph’s right edge from the right edge of the text column.
-
field space_before : Override[float] =
Override.not_set()¶ The space before the paragraph, in points.
-
field tabs : Override[list[TabStopType]] =
Override.not_set()¶ The tab stops for the paragraph.
-
field prevent_widow : Override[bool] =
Override.not_set()¶ Whether to prevent widows and orphans (a single line that appears by itself at the bottom of a page or top of the following page).
-
field show_in_bookmarks : Override[bool] =
Override.not_set()¶ Whether to show the paragraph in the bookmarks list.
Whether to show the paragraph in the TOC navigator.
-
field character_properties : CharacterProperties | None =
None¶ The additional character properties to apply to the paragraph.
-
field alignment : Override[AlignmentType] =
AlignmentType¶
- class creator_studio_doc_format.core.AlignmentType(str, Enum)[source]¶
The horizontal alignment of a paragraph.
A field accepts a member or its value, so
AlignmentType.CENTERand'center'are the same. The member’s name as a string isn’t accepted.-
CENTER =
'center'¶
-
JUSTIFIED =
'justified'¶
-
LEFT =
'left'¶
-
NATURAL =
'natural'¶ In a table cell, aligns text to the leading edge and numbers to the trailing edge. Shown in Keynote as Auto-Align Table Cell.
-
RIGHT =
'right'¶
-
CENTER =
BorderStyleType¶
-
class creator_studio_doc_format.core.BorderStyleType(*, preset_identifier=
'', stroke=Override.not_set(), width=Override.not_set(), offset=Override.not_set(), rounded=Override.not_set(), no_borders=None, all_borders=None, before=None, after=None, leading=None, trailing=None, **extra_data)[source]¶ The style of a paragraph’s borders or rules.
-
field stroke : Override[TextStroke] =
Override.not_set()¶ The stroke used to draw the border or rule.
-
field width : Override[float] =
Override.not_set()¶ The length of the paragraph’s rule lines as a fraction of the paragraph width, where
1spans the full width and shorter rules are centered. Line thickness comes fromstrokerather than from this value, and joined border lines that enclose the paragraph always span the full width.
-
field no_borders : bool | None =
None¶ Whether the paragraph has no border or rule lines. It takes precedence over
all_bordersand over the individualbefore,after,leading, andtrailingflags. Onlytruehas an effect: with none of the six flagstrue, border positions are inherited from the paragraph style rather than cleared.
-
field all_borders : bool | None =
None¶ Whether the paragraph has a border on every side.
-
field before : bool | None =
None¶ Whether the paragraph has a top rule or border.
-
field after : bool | None =
None¶ Whether the paragraph has a bottom rule or border.
-
field leading : bool | None =
None¶ Whether the paragraph has a leading rule or border (left for left-to-right paragraphs, right for right-to-left paragraphs).
-
field trailing : bool | None =
None¶ Whether the paragraph has a trailing rule or border (right for left-to-right paragraphs, left for right-to-left paragraphs).
-
field stroke : Override[TextStroke] =
CharacterProperties¶
-
class creator_studio_doc_format.core.CharacterProperties(*, preset_identifier=
'', background_color=Override.not_set(), baseline=Override.not_set(), baseline_shift=Override.not_set(), bold=Override.not_set(), capitalization=Override.not_set(), character_fill=Override.not_set(), character_fill_should_fill_container=Override.not_set(), compatibility_font_name=Override.not_set(), emphasis_mark=Override.not_set(), font_features=Override.not_set(), font_name=Override.not_set(), font_size=Override.not_set(), is_named_point_size=Override.not_set(), italic=Override.not_set(), language=Override.not_set(), ligatures=Override.not_set(), shadow=Override.not_set(), strikethrough=Override.not_set(), strikethrough_color=Override.not_set(), strikethrough_width=Override.not_set(), stroke=Override.not_set(), tracking=Override.not_set(), underline=Override.not_set(), underline_color=Override.not_set(), word_strikethrough=Override.not_set(), word_underline=Override.not_set(), writing_direction=Override.not_set(), **extra_data)[source]¶ The character-level properties of text.
A
preset_identifierhere is matched against the document stylesheet’s character styles before the presets inpresets.json, and an identifier that matches neither is silently ignored. An omitted property is inherited from that preset, from the enclosing style’s parent chain, and, for a text run, from the paragraph style in effect; anullclears it instead.-
field baseline : Override[BaselineType] =
Override.not_set()¶ The superscript or subscript setting of the text.
-
field baseline_shift : Override[float] =
Override.not_set()¶ The number of points to shift the baseline; a positive value shifts it up and a negative value shifts it down.
-
field capitalization : Override[CapitalizationType] =
Override.not_set()¶ The capitalization of the text: All Caps, Small Caps, Start Case, or Title Case.
-
field character_fill : Override[Fill] =
Override.not_set()¶ The fill inside the characters, which can be a color, a gradient, or an image. The outline around the characters comes from
strokeinstead.
-
field character_fill_should_fill_container : Override[bool] =
Override.not_set()¶ Whether a gradient
character_fillis measured across the whole text container rather than across just the text it fills. It affects only a gradient fill, and the default isfalse.
-
field compatibility_font_name : Override[str] =
Override.not_set()¶ The original font name, carried over from a PowerPoint presentation whose font was substituted, so that the name can be restored if the presentation is exported back to PowerPoint. It’s absent when no substitution took place.
-
field emphasis_mark : Override[str] =
Override.not_set()¶ The dot added to the sides of characters for emphasis in Japanese text (boten).
-
field font_features : Override[list[FontFeaturesType]] =
Override.not_set()¶ The font features applied to the text. In Apple Advanced Typography (AAT), typographic effects are achieved through two 16-bit numbers, called a feature and a selector.
-
field font_name : Override[str] =
Override.not_set()¶ The PostScript name of the font. Only the name is carried, not the font itself, so on a device that doesn’t have the font and can’t download it, the text appears in a substitute font.
-
field is_named_point_size : Override[bool] =
Override.not_set()¶ Whether
font_sizematches one of the named Chinese font sizes, such as 初号 for 42 points.font_sizeis a value in points either way.
-
field language : Override[str] =
Override.not_set()¶ The language ID of the text, for example,
en,en-GB, orsr-Cyrl.
-
field ligatures : Override[LigatureType] =
Override.not_set()¶ The ligatures to use: required, standard, or all.
-
field strikethrough : Override[StrikethroughType] =
Override.not_set()¶ The strikethrough style of the text: single, double, or none.
-
field strikethrough_color : Override[Color] =
Override.not_set()¶ The color of the strikethrough line or lines. When it’s
null, the line is drawn in the text’s own color; whether a line appears at all comes fromstrikethrough.
-
field strikethrough_width : Override[float] =
Override.not_set()¶ The thickness of the strikethrough line or lines, as a multiple of the font’s normal line thickness rather than a length in points;
1is the font’s normal thickness.
-
field stroke : Override[TextStroke] =
Override.not_set()¶ The stroke that outlines the characters.
-
field tracking : Override[float] =
Override.not_set()¶ The character spacing, as a fraction of the font’s em. For example, 0.20 adds about 20% extra spacing per character; a negative value tightens it.
-
field underline : Override[UnderlineType] =
Override.not_set()¶ The underline style of the text: single, double, wavy, or none.
-
field underline_color : Override[Color] =
Override.not_set()¶ The color of the underline. When it’s
null, the underline is drawn in the text’s own color; whether an underline appears at all comes fromunderline.
-
field word_strikethrough : Override[bool] =
Override.not_set()¶ Whether the strikethrough is drawn only through words, not through whitespace.
-
field word_underline : Override[bool] =
Override.not_set()¶ Whether the underline is drawn only beneath words, not beneath whitespace.
-
field writing_direction : Override[WritingDirectionType] =
Override.not_set()¶ The writing direction of the text: left to right, right to left, or natural for the content.
-
field baseline : Override[BaselineType] =
BaselineType¶
- class creator_studio_doc_format.core.BaselineType(str, Enum)[source]¶
The superscript or subscript setting of a text run.
A superscript or subscript run is set at a reduced size, even though
font_sizekeeps the value written for it, and the shift it applies is added tobaseline_shiftrather than replacing it.A field accepts a member or its value, so
BaselineType.DEFAULTand'default'are the same. The member’s name as a string isn’t accepted.-
DEFAULT =
'default'¶
-
SUBSCRIPT =
'subscript'¶
-
SUPERSCRIPT =
'superscript'¶
-
DEFAULT =
CapitalizationType¶
- class creator_studio_doc_format.core.CapitalizationType(str, Enum)[source]¶
The way the reader alters capitalization of text when it shows it.
A field accepts a member or its value, so
CapitalizationType.ALL_CAPSand'all_caps'are the same. The member’s name as a string isn’t accepted.-
ALL_CAPS =
'all_caps'¶ Draws every letter as a capital of the same height.
-
NONE =
'none'¶ Draws the text as written, with no change to its capitalization.
-
SMALL_CAPS =
'small_caps'¶ Draws every letter as a capital, using taller capitals for the letters that were already uppercase.
-
START =
'start'¶ Capitalizes the first letter of every word, including the short words such as articles that
titleleaves lowercase.
-
TITLE =
'title'¶ Capitalizes the text as a title, applying the language-specific title-casing rules.
-
ALL_CAPS =
FontFeaturesType¶
-
class creator_studio_doc_format.core.FontFeaturesType(*, preset_identifier=
'', feature, selector, **extra_data)[source]¶ A typographic feature of the font.
It’s named by an Apple Advanced Typography (AAT) feature type and one of that type’s settings. The feature types and their settings are listed in [Appendix F of the TrueType Reference Manual](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html).
- field feature : int [Required]¶
The identifier of the AAT font feature type, as listed in the TrueType Reference Manual, Appendix F.
- field selector : int [Required]¶
The identifier of the setting to apply within the feature type named by
feature.
LigatureType¶
- class creator_studio_doc_format.core.LigatureType(str, Enum)[source]¶
The ligatures of the font that the reader substitutes when it draws the text.
A field accepts a member or its value, so
LigatureType.ALLand'all'are the same. The member’s name as a string isn’t accepted.-
ALL =
'all'¶ Also substitutes the ligatures the font marks as optional, such as ct and st in Hoefler Text.
-
REQUIRED =
'required'¶ Substitutes only the ligatures needed for correct layout, such as those in Arabic script.
-
STANDARD =
'standard'¶ Also substitutes the ligatures the font marks as standard, which typically include pairs such as fl and fi.
-
ALL =
StrikethroughType¶
- class creator_studio_doc_format.core.StrikethroughType(str, Enum)[source]¶
The strikethrough style of text, or no strikethrough.
This value alone decides whether a line appears; the line’s color, its thickness, and whether it skips whitespace come from
strikethrough_color,strikethrough_width, andword_strikethrough.A field accepts a member or its value, so
StrikethroughType.DOUBLEand'double'are the same. The member’s name as a string isn’t accepted.-
DOUBLE =
'double'¶
-
NONE =
'none'¶
-
SINGLE =
'single'¶
-
DOUBLE =
UnderlineType¶
- class creator_studio_doc_format.core.UnderlineType(str, Enum)[source]¶
The underline style of text, or no underline.
This value alone decides whether an underline appears; the underline’s color and whether it skips whitespace come from
underline_colorandword_underline.A field accepts a member or its value, so
UnderlineType.DOUBLEand'double'are the same. The member’s name as a string isn’t accepted.-
DOUBLE =
'double'¶
-
NONE =
'none'¶
-
SINGLE =
'single'¶
-
WAVY =
'wavy'¶
-
DOUBLE =
WritingDirectionType¶
- class creator_studio_doc_format.core.WritingDirectionType(str, Enum)[source]¶
The writing direction of the text.
A field accepts a member or its value, so
WritingDirectionType.LEFT_TO_RIGHTand'left_to_right'are the same. The member’s name as a string isn’t accepted.-
LEFT_TO_RIGHT =
'left_to_right'¶ Lay the text out left to right.
-
NATURAL =
'natural'¶ Take the writing direction from the surrounding context: the paragraph style first, then the document. A paragraph that defers in this way carries no direction of its own.
-
RIGHT_TO_LEFT =
'right_to_left'¶ Lay the text out right to left.
-
LEFT_TO_RIGHT =
LineEnd¶
- class creator_studio_doc_format.core.LineEnd(str, Enum)[source]¶
A decoration drawn at the end of a connection line or of a shape’s open path, such as an arrowhead.
Decorations that can’t be represented by one of these cases are written as
simple_arrow.A field accepts a member or its value, so
LineEnd.FILLED_ARROWand'filled_arrow'are the same. The member’s name as a string isn’t accepted.-
FILLED_ARROW =
'filled_arrow'¶ A filled arrowhead, with a notched base. Shown in Keynote as “Filled arrow.”
-
FILLED_CIRCLE =
'filled_circle'¶ A filled circle. Shown in Keynote as “Filled circle.”
-
FILLED_DIAMOND =
'filled_diamond'¶ A filled diamond. Shown in Keynote as “Filled diamond.”
-
FILLED_SQUARE =
'filled_square'¶ A filled square. Shown in Keynote as “Filled square.”
-
INVERTED_ARROW =
'inverted_arrow'¶ A triangular arrowhead that points toward the center of the line instead of away from it. Shown in Keynote as “Inverted arrow.”
-
LINE =
'line'¶ A straight line across the end of the line, perpendicular to it. Shown in Keynote as Line.
-
NONE =
'none'¶ No decoration at this end of the line. Shown in Keynote as None.
-
OPEN_ARROW =
'open_arrow'¶ An open arrowhead. Shown in Keynote as “Open arrow.”
-
OPEN_CIRCLE =
'open_circle'¶ An open circle. Shown in Keynote as “Open circle.”
-
OPEN_SQUARE =
'open_square'¶ An open square. Shown in Keynote as “Open square.”
-
SIMPLE_ARROW =
'simple_arrow'¶ A simple arrowhead. Shown in Keynote as “Simple arrow.”
-
FILLED_ARROW =
LineSpacingType¶
-
class creator_studio_doc_format.core.LineSpacingType(*, preset_identifier=
'', kind=None, value, **extra_data)[source]¶ The spacing between lines of text.
-
field kind : LineSpacingKindType | None =
None¶ The kind of line spacing, which sets how
valueis interpreted:relativetreats it as a multiple of the natural line height;minimum,exact, andmaximumtreat it as a line height in points; andbetweentreats it as extra space added between lines. The default isrelative.
- field value : float [Required]¶
The amount of line spacing, interpreted according to
kind: a multiplier forrelative(1.0 is single-spaced, 2.0 double-spaced), otherwise a measurement in points. A negative value is meaningful only forbetween, where it tightens the space between lines.
-
field kind : LineSpacingKindType | None =
LineSpacingKindType¶
- class creator_studio_doc_format.core.LineSpacingKindType(str, Enum)[source]¶
A kind of line spacing.
A field accepts a member or its value, so
LineSpacingKindType.BETWEENand'between'are the same. The member’s name as a string isn’t accepted.-
BETWEEN =
'between'¶ valuepoints of space are added between lines, in addition to the natural line height.
-
EXACT =
'exact'¶ Lines are exactly
valuepoints apart.
-
MAXIMUM =
'maximum'¶ Lines are at most
valuepoints apart.
-
MINIMUM =
'minimum'¶ Lines are at least
valuepoints apart.
-
RELATIVE =
'relative'¶ valueis a multiple of the natural line height; 1.0 is single-spaced. Shown in Keynote as Lines.
-
BETWEEN =
LayoutProperties¶
-
class creator_studio_doc_format.core.LayoutProperties(*, preset_identifier=
'', columns=Override.not_set(), continuous=Override.not_set(), margins=Override.not_set(), padding=Override.not_set(), shrink_to_fit=Override.not_set(), vertical_alignment=Override.not_set(), vertical_text=Override.not_set(), writing_direction=Override.not_set(), **extra_data)[source]¶ The text layout properties of a shape style or a column of text.
An omitted property is inherited from the preset named by
preset_identifier; otherwise, it’s inherited from the shape or text box style’s preset or, for a column style, from the style named byparent. Anything still unset takes the property’s built-in default, and anullclears it instead.-
field columns : Override[ColumnMetrics] =
Override.not_set()¶ The number and spacing of the columns. The default is a single column of full width.
-
field continuous : Override[bool] =
Override.not_set()¶ Whether text using this layout continues on the page; if false, it always begins on a new page. It applies only to column layout and has no effect on shapes or text boxes.
-
field margins : Override[Insets] =
Override.not_set()¶ The margins, in points, between the edges of the text container and the column layout inside it. They apply only to column layout; for the inset applied to any text container, see
padding.
-
field padding : Override[Insets] =
Override.not_set()¶ The space, in points, between the edges of the text container and the text laid out inside it, on all four edges. Unlike
margins, which position the column layout within the container’s text area, padding insets that whole text area and applies to any text container.
-
field shrink_to_fit : Override[bool] =
Override.not_set()¶ Whether the text is scaled down to fit inside the container, to as little as 40% of the given font sizes; text that still doesn’t fit at that scale overflows. The container keeps its own size. The default is
false.
-
field vertical_alignment : Override[VerticalAlignmentType] =
Override.not_set()¶ The vertical alignment of text within a container.
-
field writing_direction : Override[WritingDirectionType] =
Override.not_set()¶ The writing direction of the text: left to right, right to left, or natural for the content.
-
field columns : Override[ColumnMetrics] =
See also