EOT 글꼴 작업

EOT 글꼴 작업

이 가이드는 임베디드 OpenType (EOT) 파일을 로드하고 이를 현재 브라우저와 운영 체제에서 사용할 수 있는 TTF 또는 WOFF2와 같은 최신 포맷으로 변환하는 방법을 보여줍니다.

임베디드 OpenType (EOT)는 주로 오래된 Internet Explorer 버전에서 사용되는 레거시 웹 글꼴 포맷입니다. Aspose.Font FOSS for Python는 EOT 글꼴을 로드하고 웹 또는 데스크톱용 최신 포맷으로 변환할 수 있습니다.


EOT 글꼴 로드

FontLoader.open()는 바이너리 헤더에서 EOT 포맷을 자동 감지하고 font_name 및 num_glyphs와 같은 표준 메타데이터 속성을 가진 글꼴 객체를 반환합니다.

from aspose_font import FontLoader

font = FontLoader.open("LegacyFont.eot")
print(font.font_name, font.num_glyphs)

EOT를 TTF로 변환

FontConverter.convert(font, target)는 로드된 모든 글꼴을 받아 지정된 대상 포맷으로 새로운 글꼴 객체를 생성합니다. 변환 과정에서 글리프 윤곽선과 메타데이터가 보존됩니다.

from aspose_font import FontLoader
from aspose_font.converter import FontConverter  # internal API — may change between releases

eot = FontLoader.open("LegacyFont.eot")
ttf = FontConverter.convert(eot, target_format="ttf")

팁 및 모범 사례

  • EOT 파일은 로드하고 다른 형식으로 변환할 수 있습니다; EotSerializer.serialize(font)을 사용하여 EOT 바이너리 출력을 생성합니다
  • 최신 웹 제공을 위해, FontConverter.convert(font, "woff2")를 통해 EOT를 WOFF2로 변환합니다
  • 직접 EOT 직렬화를 위해 EotSerializer.serialize()를 사용합니다

API Reference 요약

클래스 / 메서드설명
FontLoader.open(path)파일 경로에서 EOT 글꼴을 로드
FontConverter.convert(font, target_format)EOT를 다른 형식으로 변환
EotSerializer직접 EOT 직렬화

참조

 한국어