Type1Font

개요

Type1Font은 Aspose.Font FOSS for Python에 있는 클래스입니다. 상속 대상: Font.

Type1Font.load_afm는 주어진 경로에서 AFM 파일을 로드하여 Type1Font 인스턴스에 넣습니다.

이 클래스는 Python 프로그램에서 Type1Font 객체를 다루기 위한 15개의 메서드를 제공합니다. 사용 가능한 메서드에는: __init__, convert, encoding, font_family, font_name, font_style, font_type, get_kern_pairs, glyph_accessor, load_afm, metrics, num_glyphs와 추가 3개의 메서드가 포함됩니다. 모든 public 멤버는 Aspose.Font FOSS for Python 패키지를 설치한 후 any Python 애플리케이션에서 접근할 수 있습니다. 속성: encoding, font_family, font_name, font_style, font_type, glyph_accessor와 추가 2개가 있습니다.

속성

이름유형액세스설명
font_typeFontType읽기폰트 유형을 가져옵니다.
font_namestr읽기글꼴 이름을 가져옵니다.
font_familystr읽기폰트 패밀리를 가져옵니다.
font_stylestr읽기글꼴 스타일을 가져옵니다.
num_glyphsint읽기글리프 수를 가져옵니다.
metricsFontMetrics읽기메트릭을 가져옵니다.
encodingFontEncoding읽기인코딩을 가져옵니다.
glyph_accessorGlyphAccessor읽기글리프 접근자를 가져옵니다.

메서드

시그니처설명
__init__(raw_data: bytes, font_data: Type1FontData, is_pfa: bool)Calls init 이 Type1Font 인스턴스에서.
get_kern_pairs() → list[KernPair]kern pairs를 반환합니다.
load_afm(path: str)주어진 경로에서 AFM 파일을 Type1Font 인스턴스로 로드합니다
`to_bytes(font_type: FontTypeNone)→bytes`
font_type() → FontType폰트 형식을 식별하는 FontType 열거값을 반환합니다.
font_name() → str이 Type1Font 인스턴스에서 font_name을(를) 호출합니다.
font_family() → str속성은 폰트의 패밀리 이름을 저장합니다.
font_style() → str폰트의 스타일 설명자(예: Bold, Italic)를 반환합니다.
num_glyphs() → int속성은 글꼴의 글리프 총 개수를 제공합니다.
metrics() → FontMetrics속성은 글꼴에 대한 FontMetrics 객체에 대한 접근을 제공합니다.
encoding() → FontEncoding글꼴의 문자 인코딩을 설명하는 FontEncoding 객체를 반환합니다.
glyph_accessor() → GlyphAccessor글꼴에서 글리프 데이터를 가져오기 위한 GlyphAccessor를 반환합니다.
save(path: str)글꼴을 현재 형식으로 지정된 파일 경로에 기록합니다
save_to_format(font_type: FontType, path: str)제공된 경로에 주어진 FontType로 변환된 글꼴을 저장합니다
convert(target: FontType) → Font이 Type1Font 인스턴스에서 convert를 호출합니다.

참조

 한국어