Home/ Reference/ Units & Conversion

Font size: points vs document units

The one measurement that ignores doc.Unit: the size argument of CreateArtisticText and TextRange.Size are both in points. 172pt ≈ 60.7mm.

Name

Font size: points vs document units

Notes

The one measurement that ignores doc.Unit: the size argument of CreateArtisticText and TextRange.Size are both in points. 172pt ≈ 60.7mm.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
layer = doc.ActivePage.ActiveLayer

# font size is the one value that ignores document units; it is always points
txt = layer.CreateArtisticText(0, 100/25.4, "Headline", 0, -1,
                               "Source Han Sans Bold", 72, 0, 0, 0, 3)
# that 72 above means 72pt, roughly 25.4mm tall

print("Font size: ", txt.Text.Story.Characters.All.Size, "pt")

About this section: Units & Conversion

Units & Conversion — document units and conversion.

Other entries in this section