OSDN Git Service

Forgot to change fonts.ids -> fonts.hashes.identifiers
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 4 Jul 2013 21:09:37 +0000 (06:09 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 4 Jul 2013 21:09:37 +0000 (06:09 +0900)
src/ltj-otf.lua
src/ltj-rmlgbm.lua
test/valign.lua

index faef663..cdcd7e2 100644 (file)
@@ -70,7 +70,7 @@ end
 
 local function cid(key)
    if key==0 then return append_jglyph(char) end
-   local curjfnt = fonts.ids[tex.attribute[attr_curjfnt]]
+   local curjfnt = fonts.hashes.identifiers[tex.attribute[attr_curjfnt]]
    if not curjfnt.cidinfo or 
       curjfnt.cidinfo.ordering ~= "Japan1" and
       curjfnt.cidinfo.ordering ~= "GB1" and
@@ -135,9 +135,9 @@ luatexbase.add_to_callback('pre_linebreak_filter',
 --   これらの文字指定は,和文フォント定義ごとに,それぞれのフォントの
 --   CID <-> グリフ 対応状況による変換テーブルが用意される.
 
--- フォント読み込み時に,CID
+-- 和文フォント読み込み時に,CID -> unicode 対応をとっておく.
 local function cid_to_char(fmtable, fn)
-   local fi = fonts.ids[fn]
+   local fi = fonts.hashes.identifiers[fn]
    if fi.cidinfo and fi.cidinfo.ordering == "Japan1" then
       fmtable.cid_char_type = {}
       for i, v in pairs(fmtable.chars) do
index f7553d0..e08cbf1 100644 (file)
@@ -319,7 +319,7 @@ local function mk_rml(name, size, id)
    fontdata.name = specification.name .. size .. var; cachedata.name = fontdata.name
    fontdata.fullname = specification.name .. var; cachedata.fullname = fontdata.fullname
    fontdata.psname = specification.name; cachedata.psname = fontdata.psname
-   fonts.ids[id] = cachedata
+   fonts.hashes.identifiers[id] = cachedata
 
    return fontdata
 end
index 94f952e..2366351 100644 (file)
@@ -29,7 +29,8 @@ local function print_scaled(s)
    return out
 end
 local function set_valign(fmtable, fn)
-   local fi = fonts.ids[fn]
+   local fi = fonts.hashes.identifiers[fn]
+   if not fi.ascender then fi = fi.parameters end
    local mt = fmtable.char_type[0]
    local ma = mt.height / (mt.height + mt.depth) * (fi.ascender + fi.descender)
    fmtable.down_offset = round(fi.ascender - ma)