Aspose.Font FOSS for Python

API Reference cho Aspose.Font FOSS for Python v1.0.0. 139 public types organized by module.

Cửa lửa Core

ClassDescription
ActiveTupleSummaryActiveTupleSummary.to_dict() trả về một từ điển chứa chỉ số của tuple, giá trị quy mô, tọa độ cao, coordinates khởi đầu và kết thúc.
AnimationAssetAnimationAsset.write_to(path) viết dữ liệu hoạt hình được tạo ra đến vị trí hệ thống tệp, tạo thư mục mẹ mất và trả về Đường của tách chữ.
AnimationFramePackageAnimationFramePackage.write_to(path) viết hình ảnh kịch bản, mỗi hình thức khung và một biểu hiện JSON mô tả các nhãn fps và khớp vào thư mục cụ thể.
AnimationPresetAnimationPreset.name stores the identifier of the animation preset.
AnimationPreviewBuilderAnimationPreviewBuilder.available_presets returns a tuple of preset names for animation generation.
AnimationReviewPackageAnimationReviewPackage.write_to saves the review package to the given filesystem path and returns the Path.
AnimationShowcasePackageAnimationShowcasePackage.write_to writes the package to the given path and returns the resulting Path.
AnimationStepAnimationStep.coordinates stores a mapping of axis names to float values defining the font instance.
BinaryReaderThay đổi một nguồn byte trong tìm kiếm BytesIO cho phông chữ big-endian nhị phân.
BinaryWriterTích hợp byte cho phông chữ nhị phân.
CffSerializerCffSerializer có thể phân loại một CffFont được đặt đầy đủ thành một phần byte phù hợp để viết ra như là một tập tin chữ cái CFF hoặc OpenType.
ClosePathKhóa học mở rộng PathCommand.
CompatibilityCheckerCompatibilityChecker.compare_fonts( trước, sau, trước_label, after_Label , codepoints, text) tạo ra một CompatibilityReport có thể được xuất khẩu sang JSON thông qua report.to_json (indent=2, sort_keys=True).
CompatibilityReportCompatibilityReport.to_json(indent, sort_keys) trả về một dòng JSON của báo cáo và write_json(target, indent , sort-key) viết rằng JSon trực tiếp vào tệp.
CompletedTaskRecordCompletedTaskRecord.task_id uniquely identifies the completed task.
CompositeComponentMovementCompositeComponentMovement.to_dict returns a dict of the object’s numeric and boolean fields.
CompositeGlyphComponentCompositeGlyphComponent.to_dict() trả về một đốm của các thuộc tính số của thành phần.
CoverageGroupChẩn đoán bao gồm cho một nguồn yêu cầu như một bản vẽ trước, văn bản hoặc phạm vi.
CurveAdapterCurveAdapter.quad_to_cubic converts a quadratic Bézier (p0, q, p3) to an equivalent cubic Bézier, returning four points.
CurveToCurveTo.x1 is the x‑coordinate of the first Bézier control point.
DeltaInspectorDeltaInspector cho phép phân tích delta chi tiết của biến-font, tạo ra các đối tượng GlyphDeltaReport và TextDeltaReport để nhấn mạnh sự phối hợp thay đổi trong mỗi trường hợp.
DeltaPointDeltaPoint.to_dict returns a dictionary of the point’s numeric components.
DeltaTupleReportDeltaTupleReport.tuple_index is the zero‑based index of the delta tuple.
EotSerializerEotSerializer.serialize(font) trả về toàn bộ biểu tượng nhị phân của một phông chữ EOT sẵn sàng cho xuất file.
FamilyReviewExportPackageFamilyReviewExportPackage.write_to(directory) tạo ra một tập hợp các tệp HTML, CSS và biểu hiện cho gia đình phông chữ, trả về danh sách các con đường tách file được tạo.
FontCơ sở trừu tượng cho tất cả các ứng dụng định dạng font.
FontCleanerTải phông metadata và bảng kỹ thuật làm sạch.
FontConversionExceptionTăng khi chuyển đổi định dạng phông chữ thất bại hoặc không được hỗ trợ.
FontConverterFontConverter.convert(font, target) tạo ra một đối tượng Font mới trong định dạng mục tiêu, tăng FontConversionException nếu chuyển đổi không thể được thực hiện.
FontEncodingBản đồ Unicode codepoints đến glyph IDs.
FontExceptionKhóa học cơ bản cho tất cả các ngoại lệ thư viện chữ.
FontLoaderFontLoader.open(source, font_type, collection_index) trả về một đối tượng Font đại diện cho loại phông chữ được yêu cầu mà không hoàn toàn tải toàn bộ tệp vào trí nhớ.
FontMetricsFontMetrics tiết lộ các giá trị typographic chính như units_per_em, ascender, descender và line_gap cho tính toán bố trí.
FontNotSupportedExceptionĐược nâng cấp cho các tính năng phông chữ có hiệu lực nhưng không được hỗ trợ (ví dụ:.
FontParseExceptionTăng khi dữ liệu phông chữ nhị phân không thể được đếm.
FontPreviewBuilderFontPreviewBuilder.build(phông chữ, văn bản, kích thước, màu sắc, nền, padding, antialias, file_stem, instance_coordinates, instan_name, output_format) tạo ra một {PNG hoặc SVG) của văn Bản được cung cấp với các phông từ cụ thể.
FontSourceInfoMô tả nguồn gốc của các byte tải.
FontSubsetterFontSubsetter.available_presets() trả về một loạt các tên đặt trước có thể được sử dụng cho việc đăng ký dựa trên web.
GlyphGlyph.glyph_id identifies the glyph using its numeric GlyphId.
GlyphAccessorGlyphs được thu hồi bằng ID hoặc Unicode codepoint.
GlyphCompatibilityIssueGlyphCompatibilityIssue.to_dict returns a dictionary representation of the issue.
GlyphDeltaComparisonReportGlyphDeltaComparisonReport.moved_point_count is the count of points that moved between before and after.
GlyphDeltaReportGlyphDeltaReport.to_dict returns a dictionary representation of the report’s data.
GlyphIdGlyphId.value holds the integer identifier of a glyph.
GlyphInterpolationIssueGlyphInterpolationIssue.codepoint is the integer Unicode codepoint of the affected glyph.
GlyphLayoutMột glyph duy nhất được đặt trong các định dạng bố trí không gian thế giới.
GlyphNotFoundExceptionĐược nâng cao khi một ID glyph hoặc codepoint được yêu cầu không có bản đồ trong phông chữ.
GlyphOutlineStatsGlyphOutlineStats.to_dict returns a dictionary representation of the outline statistics.
GlyphPathMột chuỗi đặt hàng của các đối tượng PathCommand đại diện cho một đường dẫn của glyph.
KernPairKernPair.left is the GlyphId of the left glyph in the kerning pair.
LanguageProfileLanguageProfile.to_dict returns a dictionary representation of the language profile.
LineToLineTo.x represents the horizontal coordinate of the line endpoint.
LoadedFontTính thân thiện với kết quả tải mà thu thập một font cộng với metadata nguồn.
LocalizationCoverageLocalizationCoverage.to_dict returns a dictionary representation of the coverage data.
LocalizationResolutionLocalizationResolution.to_dict returns a dictionary representation of the resolution state.
MoveToMoveTo.x stores the horizontal coordinate for the move operation.
PathCommandTính hiệu hóa trừu tượng cho tất cả các loại lệnh đường.
PreviewImagePreviewImage.write_to(path) lưu PNG hoặc SVG dự báo được tạo đến vị trí hệ thống tệp cụ thể và trả về đối tượng Đường.
QuadraticToQuadraticTo.x1 represents the x‑coordinate of the quadratic Bézier control point.
RasterizerScanline rasterizer cho GlyphPath outlines với PNG xuất tinh.
RequestedLanguageHintRequestedLanguageHint.to_dict returns a dictionary representation of the hint object.
ResolvedInstanceResolvedInstance.label is the human‑readable name of the resolved instance.
SmartInstancerSmartInstancer.instantiate(tương thích, instance_name, naming_strategy, family_suffix, legacy_family_nam, typographic_Family-nam , legation_style_nom, tipographic _style-name , stat_policy) trả về một TtfFont đối tượng đại diện cho một ví dụ tĩnh của chữ số biến đổi.
SubsetCoverageThêm các chẩn đoán bao phủ Unicode cho một yêu cầu đăng ký.
SubsetResultTùy chọn sản xuất kết hợp với báo cáo bao phủ được sử dụng để sản sinh ra nó.
TaskCompletionReceiptTaskCompletionReceipt.task_id identifies the task uniquely.
TaskTokenEstimateTaskTokenEstimate.task_id is the unique identifier of the task.
TextDeltaComparisonReportTextDeltaComparisonReport.to_dict() trả về một từ điển chứa tất cả các trường báo cáo.
TextDeltaReportTextDeltaReport thu thập thông tin delta cấp glyph, tiết lộ glyf_count, active_glyph_conto và một bộ sưu tập các báo cáo glyp_ cho kiểm tra QA.
TextLayoutKết quả của một cuộc gọi TextRenderer.layout() .
TextRendererTắt văn bản bằng cách sử dụng các metrics glyph của một phông chữ và cặp hạt nhân tùy chọn.
TtfSerializerTtfSerializer.serialize serializes the given font object to a byte array, optionally using the provided sfnt version.
TupleScalarDeltaTupleScalarDelta.to_dict() trả về một đĩa với tuple_index, trước_scalar và sau_scalar giá trị.
Type1SerializerType1Serializer.serialize_pfb converts a font object to PFB binary data.
UnsupportedFontFormatExceptionĐược nâng cao bởi FontLoader khi các byte ma thuật của tệp không được nhận ra.
VariableAxisVariableAxis.normalize( giá trị) trả về vị trí bình thường (0-1) của một liên kết ax nguyên theo phạm vi được xác định của ax.
VariableAxisPresetVariableAxisPreset.to_presentation(axis) trả về một từ điển của các metadata trình bày cho tiền định, phù hợp với UI thực hiện kiểm soát tiền đặt.
VariableInstanceVariableInstance.css_variation_settings(axes) tạo ra một cột mốc CSS font-variation-settings Các dây cho bộ sưu tập axes.
WebFontAssetWebFontAsset.filename stores the original font file name as a string.
WebFontBuilderWebFontBuilder có thể tạo các gia đình web-font hoàn chỉnh với CSS, HTML Preview và tệp hiển thị sẵn sàng triển khai.
WebFontBundleWebFontBundle.write_to writes the bundle to a directory and returns the list of written file paths.
WebFontFamilyPackageWebFontFamilyPackage.write_to(directory) tạo ra một gói gia đình đầy đủ chứa CSS, HTML, một biểu hiện và tất cả các tài sản chữ ký kết hợp cho nhiều biến thể phong cách.

Enumerations

EnumerationDescription
FontTypeFontType.TTF represents the TrueType font format.

CFF Font xử lý

ClassDescription
CffCharsetCffCharset.standard(num_glyphs) tạo ra một charset CFF tiêu chuẩn cho số lượng glyph được cung cấp, và name_for(gid) trả về tên glyf cho ID glyff.
CffDictCffDict.from_bytes creates a CffDict instance from the given binary data.
CffEncodingCffEncoding.unicode_to_gid(codepoint) trả về GlyphId cho một codepoin Unicodes theo mã hóa CFF hiện tại.
CffFontCffFont.get_kern_pairs() trả về một danh sách các đối tượng KernPair đại diện cho các điều chỉnh cốt lõi được xác định trong phông chữ.
CffIndexCffIndex.from_reader(r) tạo ra một trường hợp CffIndex bằng cách phân phối dữ liệu từ một trình đọc nhị phân r.
PrivateDictPrivateDict.from_dict(d) tạo ra một ví dụ từ một từ điển chứa các bản ghi riêng tư như default_width_x và nominal_ width-x.
PrivateDictOpPrivateDictOp.BLUE_VALUES represents the BlueValues entry defining alignment zones for horizontal stems.
TopDictTopDict.from_dict(d, string_index) tạo ra một ví dụ TopDict từ biểu đồ và bảng chỉ số dòng, cho phép xây dựng lại lập trình của các dữ liệu siêu cấp font.
TopDictOpTopDictOp.VERSION represents the font’s version number.
Type2Interpreter- Hiển thị các lệnh loại 2 vào GlyphPath.

EOT Font xử lý

ClassDescription
EotFontNhúng OpenType (EOT) cột trên một phông chữ nội bộ TrueType/OpenType.
EotHeaderEotHeader.eot_size is the total size of the EOT file in bytes.

TrueType Văn bản xử lý

ClassDescription
AvarAxisMapAvarAxisMap.mapping stores a list of (float, float) tuples that define input‑output value mappings for a variable font axis.
AvarTableAvarTable.from_reader(r, chiều dài) xây dựng một AvarTable từ một người đọc nhị phân và map_normalized(axis_index, giá trị) trả về các mảnh vỡ được đánh dấu cho một định dạng axis bình thường.
AxisRecordAxisRecord.tag stores the four‑character axis tag identifier (e.g., ‘wght’).
CmapSubtableCmapSubtable.get_gid returns the glyph ID for a Unicode codepoint or None if unmapped.
CmapTableCmapTable.from_reader(r, table_length) phân đoạn một bảng cmap từ dòng chữ và best_subtable() chọn phù hợp nhất CmapSubtable cho các tìm kiếm Unicode.
DeltaSetIndexDeltaSetIndex.outer represents the outer index component of a delta set location.
DeltaSetIndexMapDeltaSetIndexMap.from_reader(r) xây dựng một DeltaSetIndexMap từ một người đọc nhị phân, và get(gid) lấy lại tương ứng DeltaSetIndex .
FvarTableFvarTable.from_reader creates a new FvarTable by reading length bytes from a BinaryReader.
GlyfTableGlyfTable.from_reader reads a GlyfTable from a BinaryReader using the specified length and returns a GlyfTable instance.
GvarTableGvarTable.from_reader reads a GvarTable from a BinaryReader using the given length and axis tags.
HMetric- Khóa học với 2 tài sản.
HeadTableHeadTable.from_reader reads a BinaryReader and returns a populated HeadTable instance.
HheaTableHheaTable.from_reader reads a BinaryReader and constructs a HheaTable object.
HmtxTableHmtxTable.from_reader reads hmtx data from a BinaryReader and creates an HmtxTable instance.
HvarTableHvarTable.advance_width_delta(gid, normalized_coordinates) trả về điều chỉnh chiều rộng cho một ID glyph tại các định dạng axis bình thường được chỉ định.
ItemVariationDataItemVariationData.from_reader creates an ItemVariationData instance by reading binary data from a BinaryReader.
ItemVariationStoreItemVariationStore.evaluate(delta_set_index, coordinates) tính toán điều chỉnh delta cho một axis biến động-font dựa trên các coordinate bình thường được cung cấp.
KernTableKernTable.build_lookup() tạo ra một bản đồ từ điển (left_gid, right_git) tuples để làm sáng giá trị cho nhanh tìm kiếm.
LocaTableLocaTable.glyph_offset(gid) trả về phần offset byte của dữ liệu glyph cho ID glyf đã được đưa ra trong bảng glyfe của chữ cái.
MaxpTableMaxpTable.to_bytes returns the binary encoding of the MaxpTable.
NameRecordNameRecord.platform_id identifies the platform for which the name record applies.
NameTableNameTable.language_key returns a language tag string for the given platform_id and language_id.
NamedInstanceNamedInstance.name_id is the integer identifier for the instance’s name record.
NamingPolicyPreviewKết quả chạy khô cho các hồ sơ tên trường hợp tĩnh được tạo ra.
Os2TableOs2Table.from_reader(r, table_length) xóa một bảng OS/2 từ một trình đọc nhị phân và trả về một Os2Table ẩn dụ.
PlatformNamingDiagnosticsPlatformNamingDiagnostics cung cấp các lá cờ và kiểm tra chiều dài (ví dụ, postscript_name_safe, postcript-name-length) để giúp đảm bảo rằng tên được tạo đáp ứng những hạn chế của nền tảng.
PostTablePostTable.version holds the version number of the post table.
StatNamingDiagnosticsStatNamingDiagnostics báo cáo xem chữ cái nguồn có chứa bảng STAT hay không và đề nghị thiết lập chính sách stat_polici thích hợp cho xuất khẩu.
TtcFaceRecordTtcFaceRecord.offset represents the byte offset of this face record within the TTC file.
TtfFontTtfFont.save(path) viết mẫu chữ hiện tại cho con đường hệ thống tệp được cung cấp trong định dạng bản địa của nó.
TtfGlyphParserTtfGlyphParser.parse parses the glyph identified by the given GlyphId and returns a Glyph object.
TtfInstancerTtfInstancer.preview_naming_policy returns a naming preview for a variable font instance based on given coordinates and naming options.
TtfTableSetTtfTableSet.get_raw returns the raw bytes of the table identified by the given tag, or None if absent.
TupleVariationTupleVariation.peak_coords holds the axis coordinate values that define the variation peak.
VariationRegionVariationRegion.scalar returns a scalar value for the region based on given coordinate mapping and axis tag order.
VariationRegionAxisVariationRegionAxis.scalar(coordinate) trả về giá trị lụa scalar cho một định dạng nhất định dọc theo ax, sử dụng các thuộc tính khởi đầu, đỉnh cao và kết thúc của ax.

Type1 Chức năng phông chữ

ClassDescription
AfmDataAfmData.font_name is the PostScript name of the font extracted from the AFM file.
AfmGlyphMetricCác thuộc tính AfmGlyphMetric tiết lộ tên glyph, điểm mã, chiều rộng tiến và hộp giới hạn cho một glyf được xác định trong tệp AFM.
PfbSegmentPfbSegment.seg_type represents the integer identifier of the segment type in a PFB file.
Type1FontType1Font.load_afm loads an AFM file from the given path into the Type1Font instance.
Type1FontDataType1FontData.full_name is the full human‑readable name of the font.
Type1InterpreterType1Interpreter.interpret interprets a Type 1 charstring and returns a GlyphPath with the bytes consumed.

WOFF / Woff2 xử lý

ClassDescription
Woff2FontWoff2Font.to_bytes(font_type) phân loại chữ WOFF2 thành một đối tượng byte cho các font_tip được chỉ định.
WoffFontWoffFont.font_type returns the FontType enumeration value of this WOFF font.

See Also

 Tiếng Việt