FontPreviewBuilder

FontPreviewBuilder

개요

FontPreviewBuilder은 Aspose.Font FOSS에서 Python용 클래스입니다.

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 FOSS for Python 패키지를 설치한 후에는 모든 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를 생성합니다.

참조

 한국어