Skip to content

Commit

Permalink
test(typesetters): Add test for U+00AD soft hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and alerque committed Dec 16, 2023
1 parent 285507e commit 2a9126d
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
76 changes: 76 additions & 0 deletions tests/feat-unicode-softhyphen.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Set paper size 297.6377985 419.5275636
Begin page
Mx 14.8819
My 28.5447
Set font Gentium Plus;10;400;;normal;;;LTR
T 47 82 85 72 80 w=26.4014 (Lorem)
Mx 44.6950
T 76 83 w=8.0078 (ip)
Mx 52.7028
T 86 88 80 w=17.1924 (sum)
Mx 69.8952
T 71 82 w=10.2295 (do)
Mx 80.1247
T 79 82 85 w=11.6992 (lor)
Mx 91.8239
T 86 76 87 w=10.0146 (sit)
Mx 101.8385
T 68 80 72 87 w=20.6836 (amet)
Mx 122.5221
T 17 w=2.2900 (.)
Mx 128.2239
T 47 82 85 72 80 w=26.4014 (Lorem)
Mx 158.0370
T 76 83 w=8.0078 (ip)
Mx 166.0448
T 86 88 80 w=17.1924 (sum)
Mx 183.2372
T 71 82 w=10.2295 (do)
Mx 193.4667
T 79 82 85 w=11.6992 (lor)
Mx 205.1659
T 86 76 87 w=10.0146 (sit)
Mx 215.1805
T 68 80 72 87 w=20.6836 (amet)
Mx 235.8641
T 17 w=2.2900 (.)
Mx 241.5659
T 47 82 85 72 80 w=26.4014 (Lorem)
Mx 271.3790
T 76 83 w=8.0078 (ip)
Mx 279.3868
T 16 w=3.3691 (-)
Mx 14.8819
My 40.5447
T 86 88 80 w=17.1924 (sum)
Mx 32.0743
T 71 82 w=10.2295 (do)
Mx 42.3038
T 79 82 85 w=11.6992 (lor)
Mx 54.0030
T 86 76 87 w=10.0146 (sit)
Mx 64.0176
T 68 80 72 87 w=20.6836 (amet)
Mx 84.7012
T 17 w=2.2900 (.)
Mx 88.8998
T 47 82 85 72 80 w=26.4014 (Lorem)
Mx 117.2097
T 76 83 86 88 80 71 82 79 82 85 86 76 87 68 80 72 87 w=77.8271 (ipsumdolorsitamet)
Mx 195.0368
T 17 w=2.2900 (.)
Mx 199.2354
T 47 82 85 72 80 w=26.4014 (Lorem)
Mx 227.5453
T 76 83 86 88 80 71 82 79 82 85 86 76 87 68 80 72 87 w=77.8271 (ipsumdolorsitamet)
Mx 305.3724
T 17 w=2.2900 (.)
Mx 14.8819
My 52.5447
T 47 82 85 72 80 w=26.4014 (Lorem)
Mx 43.9433
T 76 83 86 88 80 71 82 79 82 85 86 76 87 68 80 72 87 w=77.8271 (ipsumdolorsitamet)
Mx 121.7705
T 17 w=2.2900 (.)
End page
Finish
16 changes: 16 additions & 0 deletions tests/feat-unicode-softhyphen.sil
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
\begin[papersize=a6]{document}
\nofolios
\neverindent
% Language without hyphenation patterns
% (so we are sure that the hyphenation comes from the soft hyphens)
\set[parameter=document.language, value=und]
% The text has soft hyphens U+00AD inside words.
Lorem ip­sum­do­lor­sit­amet.
Lorem ip­sum­do­lor­sit­amet.
Lorem ip­sum­do­lor­sit­amet.% Should be hyphenated here as "ip-sum"

\set[parameter=typesetter.softHyphen, value=false]
Lorem ip­sum­do­lor­sit­amet.
Lorem ip­sum­do­lor­sit­amet.
Lorem ip­sum­do­lor­sit­amet.
\end{document}

0 comments on commit 2a9126d

Please sign in to comment.