Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF frontend #157

Closed
pcwalton opened this issue May 23, 2019 · 9 comments
Closed

PDF frontend #157

pcwalton opened this issue May 23, 2019 · 9 comments

Comments

@pcwalton
Copy link
Collaborator

@pcwalton pcwalton commented May 23, 2019

It would be nice to use Pathfinder as the backend for a PDF renderer.

@s3bk
Copy link
Contributor

@s3bk s3bk commented Jun 13, 2019

I might look into that. I have created PDFs in Rust before, so not the worst precondition.

@s3bk
Copy link
Contributor

@s3bk s3bk commented Jun 15, 2019

Oh. I just realize "Pathfinder as a backend for a PDF renderer", not a PDF as a backend for Pathfinder.
Well, now there is one at https://github.com/s3bk/pathfinder/tree/pdf_export

@s3bk
Copy link
Contributor

@s3bk s3bk commented Jun 17, 2019

Okay. I can now convert the Tiger from SVG to PDF and PDF to SVG. PDF Fonts though are a nightmare.
The code lives here.

EDIT: now here

@s3bk
Copy link
Contributor

@s3bk s3bk commented Jun 24, 2019

Some PDFs work. I have not figured out how symbol fonts work though.
grafik

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 24, 2019

The symbol fonts might be caused by some fonts (e.g. cmsy) being bitmaps rather than type 1. There are ttf versions, e.g. https://ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/ttf/ I don't know if your TeX installation can be persuaded to use them.

@s3bk
Copy link
Contributor

@s3bk s3bk commented Jun 25, 2019

This is an example. It is a Type1C font (Compact Font Format). Glyph 3 is very much defined and has a valid outline. However I can't get the glyph out of font-kit's Font
font_F3.zip

@s3bk
Copy link
Contributor

@s3bk s3bk commented Jul 26, 2019

I managed to implement Type1 (PostScript, OpenType and CFF), Type2 (CFF) and TrueType (via stb-rusttype) in Rust. Stll has a lot of missing parts, but it can render a few PDFs so far.

Code lives back in the pdf repository

@s3bk
Copy link
Contributor

@s3bk s3bk commented May 31, 2020

Progress report for those not on matrix:

  • PDF integration in demo
  • merge my fork back
  • fix text transformation
@pcwalton
Copy link
Collaborator Author

@pcwalton pcwalton commented Jul 28, 2020

We have a PDF frontend now.

@pcwalton pcwalton closed this Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.