OSDN Git Service

luatexja-preset.sty: sync with jfontmaps.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 16 Mar 2014 07:40:48 +0000 (16:40 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 16 Mar 2014 07:40:48 +0000 (16:40 +0900)
src/addons/luatexja-preset.sty
src/jfm-ujis.lua
src/ltj-setwidth.lua
src/patches/lltjdefs.sty

index 7bf54a2..6f8ad23 100644 (file)
     A-OTF-RyuminPr6N-Light.otf , A-OTF-FutoMinA101Pr6N-Bold.otf ,    % mc/m, mc/bx
     A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-FutoGoB101Pr6N-Bold.otf , % gt/m, gt/bx (multiweight))
     A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-MidashiGoPr6N-MB31.otf ,  % gt/m (uni), gt/eb
-    A-OTF-Jun101Pr6N-Light.otf                                       % mg/m
+    A-OTF-ShinMGoPr6N-Light.otf                                      % mg/m
   }
 }
 
index f64080e..bf17237 100644 (file)
@@ -3,19 +3,20 @@
 -- based on upnmlminr-h.tfm (a metric in UTF/OTF package used by upTeX).
 
 -- JIS X 4051:2004 では,行末の句読点や中点はベタなのでそれに従う
--- kanjiskip: 0pt plus .25zw minus 0pt
+-- kanjiskip:    0pt plus .25zw minus 0pt
 -- xkanjiskip: .25zw plus .25zw (or .0833zw) minus .125zw
 
 
 luatexja.jfont.define_jfm {
    dir = 'yoko',
    zw = 1.0, zh = 1.0,
-   kanjiskip =  {0.0, 0.05, 0},
+   kanjiskip =  {0.0, 0.25, 0},
    xkanjiskip = {0.25, 0.25, .125},
    [0] = {
       align = 'left', left = 0.0, down = 0.0,
       width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
       glue = {
+        -- [index] = { width, stretch, shrink, [priority, [ratio]] }
         [1] = { 0.5 , 0.0, 0.5,  0, 1 },
         [2] = {0, 0, 0},
         [3] = { 0.25, 0.0, 0.25, 1, 1 },
@@ -243,4 +244,4 @@ luatexja.jfont.define_jfm {
       }
    },
 
-}
\ No newline at end of file
+}
index 30389e2..7fd6804 100644 (file)
@@ -81,7 +81,7 @@ local function capsule_glyph(p, met, class)
       local q
       head, q = node_remove(head, p)
       setfield(p, 'yoffset', -fshift.down); setfield(p, 'next', nil)
-      setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth))
+      setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth) - fshift.left)
       local box = node_new(id_hlist)
       setfield(box, 'width', fwidth)
       setfield(box, 'height', fheight)
@@ -114,12 +114,7 @@ local function capsule_glyph_math(p, met, class)
    local y_shift, ca
       = - getfield(p, 'yoffset') + (has_attr(p,attr_ykblshift) or 0), char_data.align
    setfield(p, 'yoffset', -fshift.down)
-   if ca~='left'  then
-      setfield(p, 'xoffset', getfield(p, 'xoffset') - fshift.left
-                 + (((ca=='right') and fwidth - pwidth) or round((fwidth - pwidth)*0.5)))
-   else
-      setfield(p, 'xoffset', getfield(p, 'xoffset') - fshift.left)
-   end
+   setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth) - fshift.left)
    local box = node_new(id_hlist); 
    setfield(box, 'width', fwidth)
    setfield(box, 'height', fheight)
index 3fbc353..9d04afe 100644 (file)
@@ -31,7 +31,7 @@
 \DeclareFontShape{JY3}{gt}{bx}{n}{<-> ssub*gt/m/n}{}
 
 %fontencoding{JT3}\selectfont
-\fontencoding{JY3}\selectfont\adjustbaseline
+\kanjiencoding{JY3}\selectfont\adjustbaseline
 
 \DeclareTextFontCommand{\textmc}{\mcfamily}
 \DeclareTextFontCommand{\textgt}{\gtfamily}