Aspose.Font FOSS za Python

Referencija API za: Aspose.Font FOSS for Python v1.0.0. 139 public types organized by module.

Glavni API-ji

RazredOpisivanje
ActiveTupleSummaryActiveTupleSummary.to_dict() vraća rječnik koji sadrži indeks tuple, skalarnu vrijednost, koordinate vrha, početne i krajnje koordinete.
AnimationAssetAnimationAsset.write_to(path) piše generirane podatke animacije na danu lokaciju datoteke, stvara nedostajuće matične direktorije i vraća Put pisane datotekare.
AnimationFramePackageAnimationFramePackage.write_to(path) piše sliku storyboarda, svaku slikicu okvira i JSON manifest koji opisuje fps i oznake okvara u navedenom direktoriju.
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.
BinaryReaderOpakira izvor bajta u BytesIO za big-endian font binarnu analizu.
BinaryWriterAkumulira bajtove za serijalizaciju binarnih fontova.
CffSerializerCffSerializer može serijalno popuniti potpuno popunjeni CffFont u bajtni niz koji je pogodan za pisanje kao CFF ili OpenType datoteka fontova.
ClosePathKlasa proširenje PathCommand.
CompatibilityCheckerCompatibilityChecker.compare_fonts(prije, nakon, prije_label, poslije_labele, kodne točke, tekst) proizvodi CompatibilityReport koji se može izvoziti u JSON putem report.to_json ((indent=2, sort_keys=True).
CompatibilityReportCompatibilityReport.to_json(indent, sort_keys) vraća JSON niz izvješća i write_ json ((target, indent , sort _ keys)) piše taj JCON direktno u datoteku.
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() vraća dikta numeričkih atributa komponente.
CoverageGroupDijagnostika pokrivanja za jedan izvor zahtjeva, kao što su unaprijed postavljeni, tekst ili opseg.
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 omogućuje detaljnu analizu delta font varijable, generirajući GlyphDeltaReport i TextDeltaReport objekte koji ističu promjene koordinata u različitim instancama.
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.serializiranost font) vraća potpunu binarnu reprezentaciju EOT font spremnog za izlaz datoteke.
FamilyReviewExportPackageFamilyReviewExportPackage.write_to(directory) stvara skup HTML, CSS i manifest datoteka za font obitelj, vraćajući popis generiranih putanja datotek.
FontAbstraktna baza za sve implementacije formata fontova.
FontCleanerMetapodatke fontova i tehnički čistač stola.
FontConversionExceptionPodignuta kada konverzija formata fontova ne uspije ili nije podržana.
FontConverterFontConverter.convert(font, target) proizvodi novi font objekt u ciljnom formatu, uzdižući FontConversionException ako konverzija ne može biti izvršena.
FontEncodingUnicode kodovi za identifikacije glifa.
FontExceptionOsnovna klasa za sve iznimke knjižnice fontova.
FontLoaderFontLoader.open ((izvor, font_type, collection_index) vraća Font objekt koji predstavlja traženi tip šifre bez potpune upisivanja cijele datoteke u memoriju.
FontMetricsFontMetrics izložava ključne tipografske vrijednosti kao što su units_per_em, ascender, descender i line_gap za izračune rasporeda.
FontNotSupportedExceptionU slučaju da je to moguće, potrebno je provesti postupke za utvrđivanje vrijednosti.
FontParseExceptionPodignut kada se podaci iz binarnog font-a ne mogu analizirati.
FontPreviewBuilderFontPreviewBuilder.build(font, text, size, color, background, padding, antialias, file_stem, instance_coordinates, instance_name, output_format) generiše PreviewImage (PNG ili SVG) isporučenog teksta renderiranog s datim fontom.
FontSourceInfoOpisati izvor učitalih bajta.
FontSubsetterFontSubsetter.available_presets() vraća tuplom unaprijed postavljenih imena koja se može koristiti za web-orijentirane podsastavljanja.
GlyphGlyph.glyph_id identifies the glyph using its numeric GlyphId.
GlyphAccessorPronalazi glife po ID-u ili Unicode kodnom točki.
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.
GlyphLayoutJedini glif postavljen u svetsko-prostornim koordinatama.
GlyphNotFoundExceptionPodignut kada je zatražen ID ili kodni punkt bez mapiranja u font.
GlyphOutlineStatsGlyphOutlineStats.to_dict returns a dictionary representation of the outline statistics.
GlyphPathSrednja redoslijeda PathCommand objekata koji predstavljaju obris jednog glifa.
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.
LoadedFontPrijateljski rezultat učitača koji okružuje font plus izvorni metapodatki.
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.
PathCommandAbstraktni marker za sve vrste zapovijedi o stazi.
PreviewImagePreviewImage.write_to(path) čuva generirani PNG ili SVG pregled na određenu lokaciju datoteke i vraća Path objekt.
QuadraticToQuadraticTo.x1 represents the x‑coordinate of the quadratic Bézier control point.
RasterizerScanline rasterizer za GlyphPath konture s čistim Python PNG izvozom.
RequestedLanguageHintRequestedLanguageHint.to_dict returns a dictionary representation of the hint object.
ResolvedInstanceResolvedInstance.label is the human‑readable name of the resolved instance.
SmartInstancerSmartInstancer.instantiate(koordinate, instance_name, naming_strategy, family_suffix, legacy_family_names, typographic_familiename, legity_style_nama, tipographic _style _name , stat_policy) vraća objekt TtfFont koji predstavlja statičnu instancciju fontne varijable.
SubsetCoverageAgregirana dijagnostika Unicode pokrivenosti za zahtjev za podmještaj.
SubsetResultIznos za podjednako izračunano izdanje, koji je povezano s izvješćem o pokrivenosti kojim se ono proizvede.
TaskCompletionReceiptTaskCompletionReceipt.task_id identifies the task uniquely.
TaskTokenEstimateTaskTokenEstimate.task_id is the unique identifier of the task.
TextDeltaComparisonReportTextDeltaComparisonReport.to_dict() vraća rječnik koji sadrži sva polja izvješća.
TextDeltaReportTextDeltaReport agregira informacije o delta-nivou glifa, otkrivajući broj glifova, aktivni brojglifov i zbirku izvješća o glifu za provjeru kontrole kvalitete.
TextLayoutRezultat pozive TextRenderer.layout.
TextRendererIzlaže tekst koristeći metrike glifa fontova i opcionalne pare jezgra.
TtfSerializerTtfSerializer.serialize serializes the given font object to a byte array, optionally using the provided sfnt version.
TupleScalarDeltaTupleScalarDelta.to_dict() vraća dikta s tuple_index, before_scalar i after_Scaler vrijednostima.
Type1SerializerType1Serializer.serialize_pfb converts a font object to PFB binary data.
UnsupportedFontFormatExceptionPodignut od strane FontLoader kada se čarobni bajtovi datoteke ne prepoznaju.
VariableAxisVariableAxis.normalize(value) vraća normalizirano (0-1) položaj koordinate osi u skladu s definiranim opsegom osovine.
VariableAxisPresetVariableAxisPreset.to_presentation(axis) vraća rječnik metapodataka prezentacije za prednastavljenost, pogodna za renderiranje UI-ja.
VariableInstanceVariableInstance.css_variation_settings(axes) proizvodi tupl CSS-a. font-variation-settings Stringovi za određenu skupinu osi.
WebFontAssetWebFontAsset.filename stores the original font file name as a string.
WebFontBuilderWebFontBuilder može generirati cjelovite obitelji web-fontova s CSS, HTML stranicama za pregled i manifestnim datotekama spremnima za primjenu.
WebFontBundleWebFontBundle.write_to writes the bundle to a directory and returns the list of written file paths.
WebFontFamilyPackageWebFontFamilyPackage.write_to(directory) stvara kompletan paket obitelji koji sadrži CSS, HTML, manifest i sve sastavljene fontne imovine za više varijanti stila.

Popisivanje

Popis i broj članakaOpisivanje
FontTypeFontType.TTF represents the TrueType font format.

CFF rukovanje fontom

RazredOpisivanje
CffCharsetCffCharset.standard(num_glyphs) stvara standardni CFF znakovnik za dati broj glifa, a name_for ((gid) vraća ime glifova za ID-a glifoda.
CffDictCffDict.from_bytes creates a CffDict instance from the given binary data.
CffEncodingCffEncoding.unicode_to_gid(codepoint) vraća GlyphId za Unicode kodnu točku prema trenutnom CFF kodiranju.
CffFontCffFont.get_kern_pairs() vraća popis KernPair objekata koji predstavljaju podešavanja kerning definirane u font.
CffIndexCffIndex. from_reader(r) stvara instanciranje CffIndex prerađivanjem podataka iz binarnog čitatelja r.
PrivateDictPrivateDict.from_dict(d) stvara instanciranje PrivateDict iz rječnika koji sadrži privatne diktirane unose kao što su default_width_x i nominal_ width _x.
PrivateDictOpPrivateDictOp.BLUE_VALUES represents the BlueValues entry defining alignment zones for horizontal stems.
TopDictTopDict.from_dict(d, string_index) stvara instanciranje TopDict iz predstavljanja rječnika i tabele stringa-indeksa, omogućavajući programsku rekonstrukciju metapodataka na najvišem nivou fontova.
TopDictOpTopDictOp.VERSION represents the font’s version number.
Type2InterpreterInterpretira tip 2 charstrings u GlyphPath zapovijedi.

EOT rukovanje fontom

RazredOpisivanje
EotFontUgrađen OpenType (EOT) oklop nad unutarnjim fontom TrueType / OpenType.
EotHeaderEotHeader.eot_size is the total size of the EOT file in bytes.

TrueType Upravljanje fontom

RazredOpisivanje
AvarAxisMapAvarAxisMap.mapping stores a list of (float, float) tuples that define input‑output value mappings for a variable font axis.
AvarTableAvarTable. from_reader(r, length) konstruira AvarTable iz binarnog čitatelja i map_normalized ((axis_index, value) vraća mapiranom plovištu za normaliziranu koordinatu osi.
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) analizira cmap tablicu iz font streama i best_subtable (()) odabere najprikladniju CmapSubtable za Unicode pretrage.
DeltaSetIndexDeltaSetIndex.outer represents the outer index component of a delta set location.
DeltaSetIndexMapDeltaSetIndexMap.from_reader(r) konstruira DeltaSetIndexMap iz binarnog čitatelja, a get ((gid) preuzima odgovarajuću 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.
HMetricKlasa s 2 svojstva.
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, normalizirane_koordinate) vraća prilagodbu širine za ID glifa na navedenim koordinatama normalizacije osi.
ItemVariationDataItemVariationData.from_reader creates an ItemVariationData instance by reading binary data from a BinaryReader.
ItemVariationStoreItemVariationStore.evaluate(delta_set_index, koordinate) izračunava delta prilagodbu za osi varijable-font na temelju dostavljenih normaliziranih koordinaata.
KernTableKernTable.build_lookup() stvara rječnik mapiranje (left_gid, right_git) tuples na kerning vrijednosti za brz pretraživanje.
LocaTableLocaTable.glyph_offset(gid) vraća zaokretanje bajtova podataka o glifima za datog ID-a glifa u tablici glifoda font.
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.
NamingPolicyPreviewRezultat suhoga pokretanja za generirane zapise imena statičkih primjera.
Os2TableOs2Table. from_reader(r, table_length) analizira OS/2 tablicu iz binarnog čitatelja i vraća instanciranje Os2Table .
PlatformNamingDiagnosticsPlatformNamingDiagnostics pruža booleanske zastave i provjere dužine (npr. postscript_name_safe, postscrip_namen_dužina) kako bi se osiguralo da generirana imena ispunjavaju ograničenja platforme.
PostTablePostTable.version holds the version number of the post table.
StatNamingDiagnosticsStatNamingDiagnostics izvješćuje o tome sadrži li izvorni font STAT tabele i preporučuje odgovarajuće postavke stat_policy za izvoz.
TtcFaceRecordTtcFaceRecord.offset represents the byte offset of this face record within the TTC file.
TtfFontTtfFont.save(path) piše trenutnu instancciju font-a na dostavljenu stazu datoteke u svom izvornom formatu.
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(koordinata) vraća vrijednost skalarnog pluta za danu koordinatu duž osi, koristeći svojstva početka, vrha i kraja osi.

Prikaz broja:

RazredOpisivanje
AfmDataAfmData.font_name is the PostScript name of the font extracted from the AFM file.
AfmGlyphMetricAfmGlyphMetric svojstva izlože ime glifa, kodnu točku, proširenu širinu i okvir za graničenje za glif definiran u AFM datoteku.
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.

Srednja strana (s)

RazredOpisivanje
Woff2FontWoff2Font.to_bytes(font_type) serijalizira WOFF2 font u objekt za bajtove za naveden tip fonta.
WoffFontWoffFont.font_type returns the FontType enumeration value of this WOFF font.

Također pogledajte:

 Hrvatski