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

Fix: Only break text into several spans if the font fallback is not the same (in _preProcessSpans) #1744

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erwamartin
Copy link

Right now, when the main font doesn’t support certain characters, it creates a separate span for each one. This causes problems with the Arabic layout processor (and similar scripts), which needs the characters to stay together for proper rendering.

With this fix, we’ll only create a new span if the fallback font is different, allowing the layout to work correctly for complex scripts like Arabic.

Fixes #1743

@DavBfr
Copy link
Owner

DavBfr commented Oct 5, 2024

Can you add a test that highlight the fix with a correct rendering?

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

Successfully merging this pull request may close these issues.

Incorrect Arabic text rendering when using Arabic font as fallback in PDF export
2 participants