-
-
Notifications
You must be signed in to change notification settings - Fork 691
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
Non-breaking spaces have different size #2269
Comments
You’re right. The current justification code adds extra space to space characters only. There are many places in the code when we assume that spaces are only "normal" spaces. In this case, the problem is in: WeasyPrint/weasyprint/layout/inline.py Lines 1119 to 1125 in 1aae145
We count spaces and use it to set WeasyPrint/weasyprint/layout/inline.py Line 1131 in 1aae145
And fix our spacing adjustment here: WeasyPrint/weasyprint/text/line_break.py Lines 182 to 196 in 1aae145
For now we don’t have to support all justification opportunities as we don’t support |
In this rendering:
First two words (
o kliknutí
) have a NBSP between them (czech typography rules). However, IMHO this only forbirds line breaks; there is no reason for this space to have a different size than other inter-word spaces on the same line.The text was updated successfully, but these errors were encountered: