OSDN Git Service

Problems in test10-otf.tex
authorKazuki Maeda <kmaeda@users.sourceforge.jp>
Sun, 18 Sep 2011 03:39:58 +0000 (12:39 +0900)
committerKazuki Maeda <kmaeda@users.sourceforge.jp>
Sun, 18 Sep 2011 03:39:58 +0000 (12:39 +0900)
src/luatexja-otf.sty
src/luatexja/otf.lua
test/test10-otf.pdf
test/test10-otf.tex

index 6bd3d78..a01d49b 100644 (file)
 %! Main part of luatexja-otf
 \RequireLuaModule{luatexja.otf}
 
-\protected\def\CID#1{\directlua{luatexja.otf.cid(#1)}}
+\protected\def\CID#1{\char\directlua{luatexja.otf.cid(#1)}\relax}
 
 %% \UTF being compatible with the OTF package for pLaTeX
-\protected\def\UTF#1{\char"#1}
+\protected\def\UTF#1{\char"#1\relax}
 
 %%------------------ all done
 \ltj@otf@AtEnd
index 15e9312..1c8caf7 100644 (file)
@@ -10,7 +10,6 @@ luatexbase.provides_module({
 module('luatexja.otf', package.seeall)
 
 require('luatexja.base');      local ltjb = luatexja.base
-require('luatexja.jfont');     local ltjf = luatexja.jfont
 
 local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
 
@@ -29,7 +28,7 @@ function cid(key)
                          'Use a font including the specified CID character.')
       return
    end
-   tex.print("\\char"..tostring(char).."\\relax")
+   tex.print(char)
 end
 
 -------------------- all done
index db8283e..8e78e1e 100644 (file)
Binary files a/test/test10-otf.pdf and b/test/test10-otf.pdf differ
index e95b783..ebe448d 100644 (file)
@@ -2,6 +2,7 @@
 \documentclass{bxjsarticle}
 \usepackage{luatexja}
 \usepackage{luatexja-otf}
+\usepackage{luatexja-fontspec}
 \begin{document}
 
 ※このファイルはフォントを埋め込んでいないため,代替されるフォントによっては正しく
   \item \UTF{9B87}とは岩魚(イワナ)のことであり,嘉魚とも書く。
 \end{itemize}
 
+\section*{要検討}
+現在の実装だと,対応する Unicode の符号位置を取得して単純に \verb|\char| に
+渡しているだけなので,以下の問題がある.
+\begin{itemize}
+\item 欧文文字範囲に設定されている文字は CID で出力しても欧文フォントになる.
+  例: あ\CID{18}1あ
+\item OpenType の feature が指定されているとそちらが優先される.
+  例: {\jfontspec[NoEmbed,CJKShape=JIS1978]{Ryumin-Light}\CID{3056}\CID{8267}}
+  (左は一点,右は二点になってほしい.)
+\end{itemize}
+
 \end{document}