Skip to content

Commit

Permalink
Pass through vestigial items where multiple codepoints have been conv…
Browse files Browse the repository at this point in the history
…erted into a single glyph. Allows correct hyphenation of Indic scripts; fixes #308.
  • Loading branch information
simoncozens committed Apr 14, 2016
1 parent 21db1ae commit 20e4993
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion languages/unicode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ SILE.nodeMakers.unicode = SILE.nodeMakers.base {
self:addToken(char,item)
self:makeToken()
self:makePenalty(0)
elseif lasttype and (thistype ~= lasttype and thistype ~= "cm") then
elseif lasttype and (thistype and thistype ~= lasttype and thistype ~= "cm") then
self:makeToken()
self:addToken(char,item)
else
Expand Down
27 changes: 27 additions & 0 deletions tests/bug-308.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<tests/bug-308.sil>
Set paper size 595.275597 841.8897729
Begin page
Mx 49.40787
My 156.15370
Set font Noto Sans Malayalam;12;400;;normal;;LTR
T 55 4 (സം)
Mx 69.51725
T 55 59 (സാ)
Mx 90.24772
T 47 60 (രി)
Mx 101.81412
T 260 (-)
Mx 49.40787
My 170.55370
T 159 60 (ച്ചി)
Mx 63.34147
T 47 60 (രി)
Mx 74.90787
T 147 62 20 (ക്കുക)
[1] Mx 278.32625
My 732.62998
Set font Gentium;10;400;;normal;;LTR
T 17 (1)
End page
Finish

13 changes: 13 additions & 0 deletions tests/bug-308.sil
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\begin[class=book]{document}%
\script[src=packages/frametricks]
\begin[first-content-frame=column1]{pagetemplate}
\frame[id=gutter,width=3%]
\frame[id=title, top=top(content), bottom=top(title)+5%, left=left(content), right=right(content),next=column1]
\frame[id=column1,left=left(content),top=bottom(title)+2,bottom=bottom(content),width=53pt]
\end{pagetemplate}
\par
\font[family=Noto Sans Malayalam,language=ml,size=12pt]

\noindent{}
സംസാരിച്ചിരിക്കുക
\end{document}

0 comments on commit 20e4993

Please sign in to comment.