FontPreviewBuilder

FontPreviewBuilder

概要

FontPreviewBuilder は Aspose.Font の Python 用 FOSS のクラスです。

FontPreviewBuilder.build(font, text, size, color, background, padding, antialias, file_stem, instance_coordinates, instance_name, output_format) は、指定されたフォントで描画された提供されたテキストの PreviewImage(PNG または SVG)を生成します。

このクラスは、Python プログラムで FontPreviewBuilder オブジェクトを操作するための 4 つのメソッドを提供します。利用可能なメソッドは、build、compose_difference_preview、compose_overlay_preview、compose_sheet です。Aspose.Font の Python 用 FOSS パッケージをインストールすれば、すべてのパブリックメンバーは任意の Python アプリケーションからアクセス可能です。

メソッド

シグネチャ説明
`build(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int, antialias: bool, file_stem: strNone, instance_coordinates: dict[str, float]
`compose_sheet(previews: list[PreviewImage], columns: int, gap: int, background: tuple[int, int, int], title: strNone, column_headers: list[str]
compose_difference_preview(before: PreviewImage, after: PreviewImage, file_stem: str, background: tuple[int, int, int], before_color: tuple[int, int, int], after_color: tuple[int, int, int], overlap_color: tuple[int, int, int], threshold: int) → PreviewImage指定された色としきい値を使用して、前後の画像間の差異を可視化する PreviewImage を生成します。
compose_overlay_preview(before: PreviewImage, after: PreviewImage, file_stem: str, background: tuple[int, int, int], before_color: tuple[int, int, int], after_color: tuple[int, int, int], overlap_color: tuple[int, int, int], threshold: int) → PreviewImage指定された色としきい値で前後の画像をオーバーレイした PreviewImage を生成します。

参照

 日本語