pptx.inspect
paper-pptx 0.2.0 API reference
Effective-style inspection: resolved font values with provenance (paper-pptx).
Upstream python-pptx reports None for any character property that is inherited, leaving
callers blind to what a deck actually renders. This module implements the documented
inheritance walk for font size, font name, and font color and reports, for every resolved
value, the ordered chain of sources consulted (read-only inspection is provenance-bearing).
The pinned walk, per run (levels consulted in order until one supplies the value):
- the run's own
a:rPr - the containing paragraph's
a:pPr/a:defRPr - the shape's own
p:txBody/a:lstStyleat the paragraph's indent level - placeholder shapes: the layout placeholder's
lstStyle(matched byidx, falling back totype), then the master placeholder'slstStyle(title-family → master title placeholder, otherwise master body placeholder), then the master'sp:txStylesfamily style (title/ctrTitle →titleStyle; body/subTitle/obj and vertical variants →bodyStyle; anything else →otherStyle) - non-placeholder shapes: the shape's
p:style/a:fontRef, then the presentation'sp:defaultTextStyle
Font-name theme references (+mj-lt/+mn-lt) resolve through the master's theme part
(a:fontScheme). Scheme colors resolve through the slide's p:clrMapOvr override when
present, else the master's p:clrMap, then the theme's a:clrScheme (a:sysClr uses its
lastClr). Anything genuinely outside this walk reports resolved=False with the consulted
chain — never a guessed default.
Everything here is strictly read-only: no method mutates any element, and raw-XML reads are used throughout (several upstream proxy accessors are get-or-add and would dirty the tree).
BULLET_FOLLOWS_TEXT
attributeBULLET_FOLLOWS_TEXT= 'follow text'DECK_MANIFEST_SCHEMA
attributeDECK_MANIFEST_SCHEMA= 'paper-deck-manifest'DECK_MANIFEST_VERSION
attributeDECK_MANIFEST_VERSION= 1SCHEMA_NAME
attributeSCHEMA_NAME= 'paper-text-inspection'SCHEMA_VERSION
attributeSCHEMA_VERSION= 3