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

[Feature]: Align characters in Text Layer with canvas #19638

Closed
sox8502 opened this issue Mar 10, 2025 · 1 comment
Closed

[Feature]: Align characters in Text Layer with canvas #19638

sox8502 opened this issue Mar 10, 2025 · 1 comment

Comments

@sox8502
Copy link

sox8502 commented Mar 10, 2025

Is the feature relevant to the Firefox PDF Viewer?

Yes

Feature description

Text from the text layer isn't aligned with the text in the canvas layer (image attached below). It would be great if this could be aligned to make text selection more precise. I'm wondering if there is any low hanging fruit like tweaking CSS styling that would fix this.

Image

Other PDF viewers

No response

@Snuffleupagus
Copy link
Collaborator

If you check text-selection then there's unfortunately existing issues already about the textLayer being slightly "off" from the actual rendering, which is somewhat expected since we (currently) cannot use the same font for both rendering and text-selection (and thus use a fallback font in the textLayer).

Fixing this really isn't trivial, however there's work in progress (I don't know the current state of it) to attempt to use the actual font in the textLayer which would address many of these issues.
Hence closing this one, since the general problem is already being tracked in other issues.

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