Subset a name-keyed CFF font without making it CID-keyed

Đang mở
#39 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Start by reading the crate's CFF subsetting implementation and its tests; the issue does not name specific files or entry points. Check how SID-keyed fonts are converted to CID-keyed fonts, then assess how a name-keyed subset could retain glyph SIDs, strings, and a custom encoding. Done means an option preserves name-keyed fonts and tests verify that kept glyph codes still resolve by name.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

subset converts SID-keyed CFF fonts to CID-keyed ones. That is right for new PDF output, but a PDF that already embeds a Type1C program for a simple font (/Subtype /Type1 with /FontFile3 /Subtype /Type1C) maps its one-byte codes to glyphs through glyph names (the font's /Encoding and /Differences, else the CFF's built-in encoding). A CID-keyed subset loses the names, so readers fall back to .notdef.

Would an option to keep a name-keyed font name-keyed (a charset with the kept glyphs' SIDs and the string INDEX, and a custom encoding for the kept codes) fit the crate's scope? It is the other half of subsetting fonts that existing PDFs embed; most CFF programs in PDFs are name-keyed Type1C. I can send a PR with tests if the shape is acceptable.

🤖 Generated with Claude Code

Ngôn ngữ chính
Rust
Star
61
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của typst/subsetter

Tất cả issue của typst/subsetter

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.