FontPreviewBuilder

FontPreviewBuilder

Overview

FontPreviewBuilder 是Python的Aspose.Font FOSS中的一个类.

FontPreviewBuilder.build(字体,文本,尺寸,颜色,背景,填充,反名,文件_树木,实例_坐标,例子_名称,输出_格式) 生成一个给出的文字的PreviewImage (PNG或SVG),用给定的字母进行染.

这个类提供了4种方法,用于在Python程序中使用FontPreviewBuilder 对象. 有的方法包括: build, compose_difference_preview, compose_overlay_preview, compose_sheet. 在安装Python包的Aspose.Font FOSS后,所有公众成员都可以访问任何 Python 应用程序.

Methods

SignatureDescription
`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 在给定颜色和门后的图像前后叠加

See Also

 中文