FontSubsetter

FontSubsetter

Overview

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

返回一个元组的预设名称,可以用于网向子设置.

这个类提供了11种方法,用于在Python程序中与FontSubsetter对象工作. 有的方法包括: analyze_coverage, analyze_web_coverage, available_presets, resolve_codepoints, subset, subset_by_gids, subset_by_presets, subset_by_text, subset_for_web, subset_for_web_with_coverage, subset_with_coverage. 在安装Python包的Aspose.Font FOSS后,所有公众成员都可以访问任何 Python 应用程序.

Methods

SignatureDescription
available_presets()tuple[str, ...]返回一个可用于 Web导向子设置的预设名称组
subset(font: Font, codepoints: set[int])Font创建一个新的字体,只包含所提供的Unicode代码点的符号.
subset_by_text(font: Font, text: str)Font自动从字符串中解决所需的代码点并返回一个缩小的字体
subset_by_gids(font: Font, gids: set[int])Font创建一个新的字体,只包含给定的字符标识号所识别的图形.
`subset_by_presets(font: Font, presets: strIterable[str])Font`
`subset_for_web(font: Font, presets: strIterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int]
subset_with_coverage(font: Font, codepoints: set[int])SubsetResult按代码点进行分组,并返回新字体和覆盖范围诊断.
`subset_for_web_with_coverage(font: Font, presets: strIterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int]
analyze_coverage(font: Font, codepoints: Iterable[int], groups: Iterable[CoverageGroup])SubsetCoverage报告要求的 Unicode 代码点.
`analyze_web_coverage(font: Font, presets: strIterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int]
`resolve_codepoints(presets: strIterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int]

See Also

 中文