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

Export as pdf #538

Open
JustFrederik opened this issue Apr 10, 2023 · 2 comments
Open

Export as pdf #538

JustFrederik opened this issue Apr 10, 2023 · 2 comments

Comments

@JustFrederik
Copy link

I tried to export some text as a pdf, but i doent look right. Code
That are the imports:

[dependencies]
pathfinder_canvas = { version="0.5", features=["pf-text"] }
pathfinder_geometry = "0.5.1"
pathfinder_content = "0.5"
pathfinder_renderer = "0.5"
pathfinder_export = {commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder"}

[patch.crates-io]
pathfinder_geometry = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_canvas = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_renderer = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_content = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_simd = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_gl = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_webgl = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_gpu = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_resources = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_color = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_lottie = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_magicleap_demo = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_ui = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_svg = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_metal = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_swf = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_text = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }
pathfinder_web_canvas = { commit="9e0331742dedfed41d9e7791a9afbead0e0fbcd5", git = "https://github.com/servo/pathfinder" }

And this is the resut for the pdf(the svg is fine):
foo.pdf

@s3bk
Copy link
Collaborator

s3bk commented Apr 10, 2023

That does indeed look wrong.

Possible causes:

  • broken font (parser)? try setting a font.
  • some x/y coordinates are flipped? I just checked the code and did not see anything obvious.

Try exporting a SVG with the same settings and see if that has the same problem.

@JustFrederik
Copy link
Author

I tried it with another font. The xy coordinates arent flipped and even if it wouldnt stretch the fonts, because the coordiantes only set the start position. The svg is mostly fine. The stroke has some wheird trianges, but it renders normally:
foo

So the exporter is most likly the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants