FontPreviewBuilder
FontPreviewBuilder
Przegląd
FontPreviewBuilder jest klasą w Aspose.Font FOSS dla Python.
FontPreviewBuilder.build(font, text, size, color, background, padding, antialias, file_stem, instance_coordinates, instance_name, output_format) generuje PreviewImage (PNG lub SVG) dostarczonego tekstu renderowanego przy użyciu podanej czcionki.
Ta klasa udostępnia 4 metody do pracy z obiektami FontPreviewBuilder w programach Python. Dostępne metody obejmują: build, compose_difference_preview, compose_overlay_preview, compose_sheet. Wszystkie publiczne elementy są dostępne dla każdej aplikacji Python po zainstalowaniu pakietu Aspose.Font FOSS dla Python.
Metody
| Sygnatura | Opis |
|---|---|
| `build(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int, antialias: bool, file_stem: str | None, instance_coordinates: dict[str, float] |
| `compose_sheet(previews: list[PreviewImage], columns: int, gap: int, background: tuple[int, int, int], title: str | None, 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 | Generuje PreviewImage, które wizualizuje różnice między obrazami przed i po, używając określonych kolorów i progu |
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 | Tworzy PreviewImage nakładające obrazy przed i po przy użyciu podanych kolorów i progu |