FontPreviewBuilder
Vue de l’ensemble
‘FontPreviewBuilder’ est une classe dans Aspose.Fon FOSS pour Python.
FontPreviewBuilder.build(fonte, texte, taille, couleur, fond, tapis, antialias, file_stem, instance_coordinates, instance_name, output_format) génère une préviewImage (PNG ou SVG) du texte fourni rendu avec le font donné.
Cette classe fournit 4 méthodes pour travailler avec les objets FontPreviewBuilder dans les programmes Python. Les méthodologies disponibles comprennent: build, compose_difference_preview , compose-overlay_prévue et Compose&sheet. Tous les membres publics sont accessibles à n’importe quelle application Pythone après l’installation de l’Aspose.Font FOSS pour le package PyThone.
méthodes
| Signature | Description |
|---|---|
| `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 | Generates a PreviewImage that visualizes differences between before and after images using specified colors and threshold |
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 | Produces a PreviewImage overlaying before and after images with given colors and threshold |
Voir aussi
- Aspose.Font — référence API d’entreprise