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 with the specified font family name, size, and style. |
| init | Initializes a new Font instance with a custom font family name, the folder containing the TrueType font files, and a size. |
| 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 whether it has a horizontal line through the characters. |
| style | The style of this Font. |
| underline | The font is underlined. Returns True if the font is underlined; otherwise, False. |
from groupdocs.watermark.watermarks import Font
fonts_folder = r"C:\CustomFonts"
# Create a font using a custom TrueType font located in fonts_folder
font = Font("CustomFontName", fonts_folder, 36.0)
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.