Skip to content
Discussion options

You must be logged in to vote

What I am trying to accomplish is fixing the PDF font parsing of https://github.com/fschutt/printpdf. The crate can detect and decode embedded CID fonts perfectly, but not embedded CFF fonts.

Oh I see. By OpenType wrapper I mean the rest of the tables to make it usable as an OpenType font. You have a CFF table, the following would need to be created to make it usable as an OpenType font: cmap, head, hhea, hmtx, maxp, OS/2, maybe name & post. I think it will be somewhat non-trivial to construct a Font manually. The API in not really designed for 'interactive' construction of the structs, since many of them borrow data from an underlying slice of data.

If the goal is to render the PDF the…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@wezm
Comment options

wezm Nov 11, 2025
Collaborator

Answer selected by ronnybremer
@ronnybremer
Comment options

@khaledhosny
Comment options

@ronnybremer
Comment options

Comment options

You must be logged in to vote
1 reply
@ronnybremer
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants