FontPreviewBuilder
סקירה כללית
FontPreviewBuilder הוא שיעור ב Aspose.Font FOSS עבור Python.
FontPreviewBuilder.build(קובץ, טקסט, גודל, צבע, רקע, פדנג, antialias, file_stem, instance_coordinates, instan_name, output_format) מייצר PreviewImage (PNG או SVG) של הטקסט המסופק עם האותיות שניתן.
שיעור זה מספק 4 שיטות לעבוד עם אובייקטים FontPreviewBuilder בתוכניות Python. שיטות זמינות כוללות: build, compose_difference_preview, compose_overlay_preview, compose_sheet. כל החברים הציבוריים זמינים לכל יישום Python לאחר התקנת Aspose.Font 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: 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 | יצירת 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 | מייצר מחיקה לפני ואחרי תמונות עם צבעים וטווחים מסוימים. |