On 4/13/2013 4:44 AM, hwitloc@gmail.com wrote:
I found that using \setscript{nihongo} breaks the functioning of \hskip. Here is a minimal example. MKIV required. Text source is UTF-8 encoded text.
In the first case without \setscript the Japanese \hskip properly functions, but just after the \setscript macro it fails (without err or mention). However, it is interesting to note that \hfill does work in both cases with standard alphabet text.
%-------------------------------- \usemodule[simplefonts] \setmainfont[ipaexm] % using a font having Japanese characters
\starttext \underbars{Without setscript:}
Alphabet\hskip 2cm text
漢字\hskip 2cm 文書
\setscript[nihongo] \underbars{With setscript:}
Alphabet\hskip 2cm text
漢字\hskip 2cm 文書
\stoptext %-------------------------------- end
It's because spaces are stripped and there is currently no distinction in luatex (on the todo list is to tag glue coming from spaces with their own subtype). I made a cheat. For the moment only in the japanese analyzer but it might also be needed for korean and chinese, so can you check that with cjk context users? \usemodule[art-01] \enabletrackers[scripts.*] \definefont[testfont][ipaexm.ttf][script=kana,language=jan] \startTEXpage \startformula test \stopformula \par \testfont \startscript[nihongo]\ruledhbox{漢字\hskip 2cm 文 書}\stopscript\par \testfont \startscript[nihongo]\ruledhbox to 7cm{漢字\hfill 文 書}\stopscript\par \testfont \startscript[nihongo]\ruledhbox{漢字文書}\stopscript\par \testfont \startscript[nihongo]\ruledhbox{漢字 文書}\stopscript\par \testfont \startscript[nihongo]\ruledhbox{漢字\kern 2cm 文 書}\stopscript\par \testfont \startscript[nihongo]\ruledhbox{\hskip 2cm 漢字文 書}\stopscript\par \stopTEXpage \stoptext I'll upload a new beta. Btw, what gives these threads a spam subject. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------