Skip to main content
Version: API v2 Preview

Font

Kind: class
Module/package: models
SDK: pdfdancer-client-python 2.0.0

Font face and size.

Parameters:

  • name: Font family name. Can be one of StandardFonts values or any embedded font name.
  • size: Font size in points (> 0).

Raises:

  • ValueError: If size is not positive.

Example:

from pdfdancer.models import Font, StandardFonts

title_font = Font(name=StandardFonts.HELVETICA_BOLD.value, size=16)
body_font = Font(name="MyEmbeddedFont", size=10.5)

Declaration

Font(name: str, size: float) -> None

Members

__init__

__init__(self, name: str, size: float) -> None

Initialize self. See help(type(self)) for accurate signature.

View source at af2a1171a1b9