-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Native unicode U+00A0 (nbsp) support #1918
Merged
alerque
merged 5 commits into
sile-typesetter:master
from
Omikhleia:feat-unicode-nbsp-support
Dec 16, 2023
Merged
Native unicode U+00A0 (nbsp) support #1918
alerque
merged 5 commits into
sile-typesetter:master
from
Omikhleia:feat-unicode-nbsp-support
Dec 16, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Omikhleia
requested review from
a team,
alerque and
simoncozens
as code owners
December 2, 2023 15:14
Omikhleia
commented
Dec 11, 2023
Omikhleia
commented
Dec 11, 2023
Avoid regression in this test containing non-breaking spaces.
Omikhleia
force-pushed
the
feat-unicode-nbsp-support
branch
from
December 13, 2023 23:13
92fca68
to
22b1bdb
Compare
I checked the Sura test and believe the flexible spaces are a better display and more expected output. The point of the non-breaking spaces is to make sure the marker numbers don't end up at the end of a line disconnected from the start of the related text. Maxing the spaces flexible balances those spaces with the rest of the line. |
This was referenced Dec 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was mentioned in discussion #1716 (reply in thread), and in PR #1860 (comment)
It tangentially relates to #1889 -- Via the SILE's unicode node maker, it adds native support to U+00A0 (non-breaking space) in input files being handled as a stretchable and shrinkable space for justification purpose, as per Unicode UAX 14.
Besides the above-mentioned topics, while experimenting with the French SBL bible in USX in Freely-Given-org/BibleTypesetter#3 (comment), I found it was using non-breaking spaces, defeating the special French punctuation rules from SILE. I also had the issue before, with text copied from LibreOffice (which inserts non-breaking spaces), though of course I just had to remove them from my input file (... that is, when noticing them!). -- So the French case is handled too in this PR.
One test was failing (
sura-2
) as it contains non-breaking spaces, so I added a setting to disable the feature (languages.fixedNbsp
) as I don't know the expectations here and cannot read the script -- French still gets correct punctuation spaces in that case, because it's dumb otherwise anyway. N.B. I haven't documented it in the manual (not sure it should even).Before:
After: