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

Some fonts splits words #1275

Open
2 tasks done
daniele-gusmini opened this issue Jul 18, 2022 · 1 comment
Open
2 tasks done

Some fonts splits words #1275

daniele-gusmini opened this issue Jul 18, 2022 · 1 comment

Comments

@daniele-gusmini
Copy link

What were you trying to do?

I'm modifying a pdf file, adding some text in specific places.

How did you attempt to do it?

I added the new font trough FontKit and inserted the text with drawText

Here the code
pages[2].drawText("effettuare", { x: x_pos, y: y_pos, size: fontSize, font: hindRegular, color: white, rotate: degrees(0), })

What actually happened?

It is working properly for most part of the words. But if I write for example "effettuare" it spits the word. The result on the pdf is "eff ettuare"

image

What did you expect to happen?

I would expect the word to be connected

How can we reproduce the issue?

Open the fiddle and download the file
https://jsfiddle.net/danigusm/q1796gr0/4/

Version

1.17.1

What environment are you running pdf-lib in?

Browser

Checklist

  • My report includes a Short, Self Contained, Correct (Compilable) Example.
  • I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes

No response

@phipla
Copy link

phipla commented Oct 16, 2022

This issue is probably related to issues with ligature spacing. PR #1325 provides a fix

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

No branches or pull requests

2 participants