summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-05-13 21:34:18 +0000
committerKarl Berry <karl@freefriends.org>2015-05-13 21:34:18 +0000
commitec29272038a24b651f07358507068b84abfb3c1f (patch)
treeeefd818ddda4daab926e318e594e63a6bc95055d /Master/texmf-dist/tex/luatex
parentabe56f46f87bb168edd5b162adff768e62a96e8e (diff)
luatexja (13may15)
git-svn-id: svn://tug.org/texlive/trunk@37385 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua19
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty20
4 files changed, 26 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index e0cb298680c..e5fcd0c268a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2015/02/07',
+ date = '2015/05/03',
description = 'Insertion process of JFM glues and kanjiskip',
})
module('luatexja.jfmglue', package.seeall)
@@ -384,7 +384,9 @@ local function calc_np_aux_glyph_common(lp)
if r then
local nf, nc = getfont(npn), getchar(npn)
local ct = (font.getfont(nf) or font.fonts[nf] ).characters[nc]
- if (ct.left_protruding or 0) == 0 then
+ if not ct then -- variation selector
+ node_free(r)
+ elseif (ct.left_protruding or 0) == 0 then
head = insert_before(head, npn, r)
Np.first = (Np.first==npn) and r or npn
elseif (ct.right_protruding or 0) == 0 then
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index 76ca9ff7a54..cda9d1d33e0 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfont',
- date = '2015/02/08',
+ date = '2015/05/03',
description = 'Loader for Japanese fonts',
})
module('luatexja.jfont', package.seeall)
@@ -38,7 +38,7 @@ local id_glue_spec = node.id('glue_spec')
local id_glue = node.id('glue')
local cat_lp = luatexbase.catcodetables['latex-package']
local FROM_JFM = luatexja.icflag_table.FROM_JFM
-
+local tokenlib = luatexja.token
------------------------------------------------------------------------
-- LOADING JFM
------------------------------------------------------------------------
@@ -242,12 +242,14 @@ do
end
-- EXT
- function jfontdefX(g, dir)
+ local utf8 = unicode.utf8
+ function jfontdefX(g, dir, csname)
jfm_dir, is_def_jfont = dir, true
- local t = token.get_next()
- cstemp=token.csname_name(t)
+ cstemp = csname:sub( (utf8.byte(csname,1,1) == tex.escapechar) and 2 or 1, -1)
+ cstemp = cstemp:sub(1, ((cstemp:sub(-1,-1)==' ') and (cstemp:len()>=2)) and -2 or -1)
global_flag = g and '\\global' or ''
- tex.sprint(cat_lp, '\\expandafter\\font\\csname ', cstemp, '\\endcsname')
+ tex.sprint(cat_lp, '\\expandafter\\font\\csname ',
+ (cstemp==' ') and '\\space' or cstemp, '\\endcsname')
end
luatexbase.create_callback("luatexja.define_jfont", "data", function (ft, fn) return ft end)
@@ -263,7 +265,8 @@ do
"bad JFM `" .. jfm_file_name .. "'",
'The JFM file you specified is not valid JFM file.\n'..
'So defining Japanese font is cancelled.')
- tex.sprint(cat_lp, global_flag, '\\expandafter\\let\\csname ', cstemp,
+ tex.sprint(cat_lp, global_flag, '\\expandafter\\let\\csname ',
+ (cstemp==' ') and '\\space' or cstemp,
'\\endcsname=\\relax')
return
end
@@ -282,7 +285,7 @@ do
fmtable = luatexbase.call_callback("luatexja.define_jfont", fmtable, fn)
font_metric_table[fn]=fmtable
tex.sprint(cat_lp, global_flag, '\\protected\\expandafter\\def\\csname ',
- cstemp , '\\endcsname{\\ltj@cur'..
+ (cstemp==' ') and '\\space' or cstemp, '\\endcsname{\\ltj@cur'..
(jfm_dir == 'yoko' and 'j' or 't') .. 'fnt', fn, '\\relax}')
end
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
index 3d2095cc21d..62cfcf7b19d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
@@ -51,7 +51,7 @@
\def\mc{\tenmin\tentmin}
\def\gt{\tengt\tentgt}
-\mc\tentmin
+\mc
\directlua{
local s = kpse.find_file('ltj-kinsoku.lua', 'tex')
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index 753a8405082..dd20eeead9f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2015/02/22 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2015/05/03 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -196,23 +196,23 @@
\fi %</LaTeX>
%%%%%%%% \asluastring
-\def\asluastring#1{'\luaescapestring{\detokenize{#1}}'}
+\def\asluastring#1{'\luatexluaescapestring{\detokenize{#1}}'}
%%%%%%%% Redefine \/
\protected\def\/{\relax\directlua{luatexja.jfont.append_italic()}}
%%%%%%%% \jfont\CS={...:...;jfm=metric;...}, \globaljfont
-\protected\def\jfont{%
- \afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(false, 'yoko')}}
-\protected\def\globaljfont{%
- \afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true, 'yoko')}}
+\protected\def\jfont#1{%
+ \afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(false, 'yoko','\luatexluaescapestring{\noexpand#1}')}}
+\protected\def\globaljfont#1{%
+ \afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true, 'yoko','\luatexluaescapestring{\noexpand#1}')}}
\def\ltj@@jfont{\directlua{luatexja.jfont.jfontdefY()}}
%%%%%%%% \tfont\CS={...:...;jfm=metric;...}, \globaltfont
-\protected\def\tfont{%
- \afterassignment\ltj@@tfont\directlua{luatexja.jfont.jfontdefX(false, 'tate')}}
-\protected\def\globaltfont{%
- \afterassignment\ltj@@tfont\directlua{luatexja.jfont.jfontdefX(true, 'tate')}}
+\protected\def\tfont#1{%
+ \afterassignment\ltj@@tfont\directlua{luatexja.jfont.jfontdefX(false, 'tate','\luatexluaescapestring{\noexpand#1}')}}
+\protected\def\globaltfont#1{%
+ \afterassignment\ltj@@tfont\directlua{luatexja.jfont.jfontdefX(true, 'tate','\luatexluaescapestring{\noexpand#1}')}}
\def\ltj@@tfont{\directlua{luatexja.jfont.jfontdefY()}}
%%%%%%%% \zw, \zh