Font class
Leave feedback
On this page
Represents a font.
The Font type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new Font instance with the specified font family name and size. |
| init | Initializes a new Font instance with the specified font family name, size, and style. |
| init | Initializes a new Font instance with a custom font family name, a folder containing TrueType fonts, a size, and a style. |
| init | Initializes a new Font instance with a custom font family name, the folder containing the TrueType font files, and a size. |
| Property | Description |
|---|---|
| bold | The font is bold. |
| family_name | The family name of this Font. |
| folder_path | The folder that contains TrueType font files. |
| italic | The font is italic. |
| size | The size of this Font. |
| strikeout | The font specifies a horizontal line through the text. |
| style | The style information for this Font. |
| underline | The font is underlined. |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font, Color
with Watermarker("document.pdf") as watermarker:
watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 48))
watermark.foreground_color = Color.red
watermarker.add(watermark)
watermarker.save("watermarked.pdf")
Task guides that use Font:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.