Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 docx/oxml/text/parfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class CT_PPr(BaseOxmlElement):
spacing = ZeroOrOne('w:spacing', successors=_tag_seq[22:])
ind = ZeroOrOne('w:ind', successors=_tag_seq[23:])
jc = ZeroOrOne('w:jc', successors=_tag_seq[27:])
rPr = ZeroOrOne('w:rPr', successors=_tag_seq[34:])
sectPr = ZeroOrOne('w:sectPr', successors=_tag_seq[35:])
del _tag_seq

Expand Down
15 changes: 13 additions & 2 deletions 15 docx/text/paragraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ..enum.style import WD_STYLE_TYPE
from .parfmt import ParagraphFormat
from .run import Run
from .run import Run, Font
from ..shared import Parented


Expand Down Expand Up @@ -83,7 +83,18 @@ def paragraph_format(self):
properties for this paragraph, such as line spacing and indentation.
"""
return ParagraphFormat(self._element)


@property
def font(self):
"""
The |Font| object providing access to the character formatting
properties for this paragraph, such as font name and size.
"""
pPr = self._element.pPr
if pPr is None:
return None
return Font(pPr)

@property
def runs(self):
"""
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.