Skip to content

Commit

Permalink
test(languages): Add test for Polish hyphenated words
Browse files Browse the repository at this point in the history
According to Polish typography conventions, when a break occurs at
an explicit hyphen, the hyphen gets repeated at the beginning of
the next line.

Co-authored-by: Jakub Kaczor <jakub@jakubkaczor.com>
  • Loading branch information
2 people authored and alerque committed Jan 22, 2024
1 parent cdeb726 commit af9cabf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/fix-polish-hyphen.expected
@@ -0,0 +1,23 @@
Set paper size 209.7637818 297.6377985
Begin page
Mx 162.4882
My 26.9913
Set font Gentium Plus;16;400;;normal;;;LTR
T 69 76 68 1146 82 16 w=37.7344 (biało-)
Mx 10.4882
My 46.1913
T 16 w=5.3906 (-)
Mx 15.8788
T 70 93 72 85 90 82 81 92 w=63.5703 (czerwony)
Mx 130.4882
My 65.3913
T 69 76 68 1146 82 16 w=37.7344 (biało-)
Mx 168.2226
T 70 93 72 85 w=27.5078 (czer)
Mx 195.7304
T 16 w=5.3906 (-)
Mx 10.4882
My 84.5913
T 90 82 81 92 w=36.0625 (wony)
End page
Finish
13 changes: 13 additions & 0 deletions tests/fix-polish-hyphen.sil
@@ -0,0 +1,13 @@
\begin[papersize=a7]{document}
\neverindent
\nofolios
\language[main=pl]
\font[size=16pt]

% Breaks at existing hyphens get a hyphen on the next line
\kern[width=152pt]biało-czerwony

% Breaks at other places just chill as usual
\kern[width=120pt]biało-czerwony

\end{document}

0 comments on commit af9cabf

Please sign in to comment.