WebFontBuilder

Overview

WebFontBuilder is a class in Aspose.Font FOSS for Python.

WebFontBuilder can generate complete web‑font families with CSS, HTML preview pages and manifest files ready for deployment.

This class provides 6 methods for working with WebFontBuilder objects in Python programs. Available methods include: build, build_family_matrix_preview, build_family_package, build_family_review_board, build_family_review_export_package, build_family_waterfall_preview. All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.

Methods

SignatureDescription
build_family_waterfall_preview(bundles: list[WebFontBundle], preview_text: str, file_stem: str)PreviewImageGenerates a waterfall‑style preview image for the given web font bundles using the supplied preview text and file stem
build_family_matrix_preview(bundles: list[WebFontBundle], preview_text: str, file_stem: str)PreviewImageCreates a matrix‑layout preview image for the supplied web font bundles with the specified preview text and file stem
build_family_review_board(bundles: list[WebFontBundle], family_name: str | None, preview_text: str, file_stem: str)PreviewImageAssembles a review board image comparing the given bundles, optionally labeling it with a family name, using the preview text and file stem
build_family_review_export_package(bundles: list[WebFontBundle], family_name: str | None, preview_text: str, file_stem: str)FamilyReviewExportPackagePackages the bundles and associated review assets into a FamilyReviewExportPackage for distribution, using optional family name, preview text, and file stem
build_family_package(bundles: list[WebFontBundle], family_name: str | None, css_filename: str, html_filename: str, preview_text: str, specimen_template: str)WebFontFamilyPackageCreates a complete web‑font family package containing CSS, HTML, and a specimen page based on the given template and preview text
build(font: Font, file_stem: str | None, include_woff: bool, font_display: str, preview_text: str, instance_coordinates: dict[str, float] | None, instance_name: str | None, presets: str | Iterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int] | range], specimen_template: str, variable_mode: str, naming_strategy: str, family_suffix: str | None, legacy_family_name: str | None, typographic_family_name: str | None, legacy_style_name: str | None, typographic_style_name: str | None, stat_policy: str)WebFontBundlecreates aWebFontBundle` with full control over inclusion of WOFF/WOFF2, font‑display strategy, preview text, instance coordinates, naming strategy, and many other options

See Also