Home/ Reference/ TextRange

rng.Outline

Text outline. This is the core of the yellow-text-with-black-edge look.

Signature

rng.Outline

Notes

Text outline. This is the core of the yellow-text-with-black-edge look.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)
ca = shape.Text.Story.Characters.All

# text outline: yellow fill with black edge, common in print
o = ca.Outline
o.Width = 1 / 25.4                 # 1mm outline
o.Color.RGBAssign(0, 0, 0)         # black
o.LineJoin = 1                     # miter join
o.Justification = 2                # outline sits outside so it does not eat the glyph
o.LineCaps = 1                     # round cap

print("Text outline added")

About this section: TextRange

TextRange — character ranges inside a text object.

Other entries in this section