TtfFont

Overview

TtfFont เป็นคลาสใน Aspose.Font FOSS สําหรับ Python. ทายาทจาก: Font.

TtfFont.save(path) เขียนตัวอย่าง font ปัจจุบันไปยังเส้นทางระบบไฟล์ที่ได้รับในรูปแบบพื้นบ้าน.

หมวดนี้ให้ 23 วิธีในการทํางานกับวัตถุ TtfFont ในโปรแกรม Python. วิธีการที่ใช้ได้แก่: __init__, available_naming_strategies, convert, encoding, font_family, font_name, font_style, font_type, get_axis, get_blob, get_kern_pairs, get_named_instance,และ 11 วิธีเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Python ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Python. คุณสมบัติ: axes, cff_font, encoding, font_family, font_name, font_style,และอีก 12 คน.

Properties

NameTypeAccessDescription
font_typeFontTypeReadได้รับตัวอักษร.
font_namestrReadได้ชื่อตัวอักษร.
font_familystrReadได้รับครอบครัวตัวอักษร.
font_stylestrReadได้รับรูปแบบของตัวอักษร.
num_glyphsintReadได้รับการอักษร num.
metricsFontMetricsReadได้มาตรฐานแล้ว.
encodingFontEncodingReadได้รับรหัส.
glyph_accessorGlyphAccessorReadได้รับเครื่องมือกลิฟ์.
ttf_tablesTtfTableSetReadได้ตาราง TTF.
cff_font``Readได้รับการอักษร cff.
fvar`“FvarTableNone”`Read
hvar`“HvarTableNone”`Read
is_variableboolReadได้ค่าตัวแปร.
axes"list[AxisRecord]"Readได้มีด.
named_instances"list[NamedInstance]"Readได้ตัวอย่างที่ชื่อไว้.
variable_axeslist[VariableAxis]Readได้แกนที่เปลี่ยนไป.
variable_instanceslist[VariableInstance]Readได้ตัวแทนที่เปลี่ยนได้.
smart_instancer``Readได้ตัวอย่างที่ฉลาดแล้ว.

Methods

SignatureDescription
__init__(sfnt_data: bytes, tables: TtfTableSet, sfnt_version: int)Calls init การประกอบการ ในตัวอย่างนี้ TtfFont.
get_blob(tag: str) → `bytesNone`
get_table_bytes(tag: str)bytesการคืนไบต์ของตาราง TrueType ที่กําหนดไว้
set_table_bytes(tag: str, data: bytes)กําหนดค่า bytes ของตาราง.
get_axis(tag: str) → `VariableAxisNone`
`get_named_instance(name: str, preferred_languages: strtuple[str, …])VariableInstance
`variable_presentation(preferred_languages: strtuple[str, …], include_suggested_values: bool)dict[str, object]`
available_naming_strategies()tuple[str, ...]การคืน tuple ของการระบุกลยุทธ์การตั้งชื่อที่สนับสนุน
`instantiate(coordinates: dict[str, float], naming_strategy: str, family_suffix: strNone, legacy_family_name: str
`preview_naming_policy(coordinates: dict[str, float], naming_strategy: str, family_suffix: strNone, legacy_family_name: str
get_kern_pairs()list[KernPair]กลับคู่เม็ด.
`to_bytes(font_type: FontTypeNone)bytes`
font_type()FontTypeส่งผลการนับจํานวน FontType ของตัวอักษรปัจจุบัน
font_name()strเอกสารที่ถือรหัสชื่อเต็มของตัวอักษร
font_family()strที่ดินถือชื่อครอบครัว
font_style()strอสังหาริมทรัพย์ถือชื่อสไตล์
num_glyphs()intอสังหาริมทรัพย์ถือการนับ glyphs
metrics()FontMetricsส่งกลับวัตถุ FontMetrics พร้อมข้อมูลขนาดและระยะทาง
encoding()FontEncodingการคืนของ FontEncoding อัตถุที่อธิบายการผนับตัวละคร
glyph_accessor()GlyphAccessorการคืน GlyphAccessor สําหรับการปฏิบัติ glyph ระดับต่ํา
save(path: str)` เขียนสภาพปัจจุบันของตัวอักษร TrueType ไปยังระบบไฟล์ที่ตั้งไว้
save_to_format(font_type: FontType, path: str)เรียก save_to_format ในตัวอย่าง TtfFont นี้.
convert(target: FontType)Fontการคืนของตัวการแปลง Font เป็นเป้าหมาย FontType

See Also

 ภาษาไทย