• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ソースコードの管理場所


Commit MetaInfo

Revisão37f1bb93a832e691f61cb06e771759d2602de827 (tree)
Hora2014-10-28 14:22:31
AutorHironori Kitagawa <h_kitagawa2001@yaho...>
CommiterHironori Kitagawa

Mensagem de Log

Use lang field for judgement if a glyph_node repr. a JAchar or not.

Mudança Sumário

Diff

--- /dev/null
+++ b/src/#ltj-pretreat.lua#
@@ -0,0 +1,158 @@
1+--
2+-- luatexja/ltj-pretreat.lua
3+--
4+
5+luatexja.load_module('base'); local ltjb = luatexja.base
6+luatexja.load_module('charrange'); local ltjc = luatexja.charrange
7+luatexja.load_module('stack'); local ltjs = luatexja.stack
8+luatexja.load_module('jfont'); local ltjf = luatexja.jfont
9+luatexja.load_module('direction'); local ltjd = luatexja.direction
10+
11+local Dnode = node.direct or node
12+
13+local nullfunc = function(n) return n end
14+local to_node = (Dnode ~= node) and Dnode.tonode or nullfunc
15+local to_direct = (Dnode ~= node) and Dnode.todirect or nullfunc
16+
17+local setfield = (Dnode ~= node) and Dnode.setfield or function(n, i, c) n[i] = c end
18+local getid = (Dnode ~= node) and Dnode.getid or function(n) return n.id end
19+local getfont = (Dnode ~= node) and Dnode.getfont or function(n) return n.font end
20+local getchar = (Dnode ~= node) and Dnode.getchar or function(n) return n.char end
21+local getfield = (Dnode ~= node) and Dnode.getfield or function(n, i) return n[i] end
22+local getsubtype = (Dnode ~= node) and Dnode.getsubtype or function(n) return n.subtype end
23+
24+local pairs = pairs
25+local floor = math.floor
26+local has_attr = Dnode.has_attribute
27+local set_attr = Dnode.set_attribute
28+local node_traverse = Dnode.traverse
29+local node_remove = Dnode.remove
30+local node_next = (Dnode ~= node) and Dnode.getnext or node.next
31+local node_free = Dnode.free
32+local node_end_of_math = Dnode.end_of_math
33+local tex_getcount = tex.getcount
34+
35+local id_glyph = node.id('glyph')
36+local id_math = node.id('math')
37+local id_whatsit = node.id('whatsit')
38+local sid_user = node.subtype('user_defined')
39+
40+local attr_dir = luatexbase.attributes['ltj@dir']
41+local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
42+local attr_curtfnt = luatexbase.attributes['ltj@curtfnt']
43+local attr_icflag = luatexbase.attributes['ltj@icflag']
44+
45+local is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char_direct
46+local ltjf_get_vert_glyph = ltjf.get_vert_glyph
47+local ltjf_replace_altfont = ltjf.replace_altfont
48+local attr_orig_char = luatexbase.attributes['ltj@origchar']
49+local STCK = luatexja.userid_table.STCK
50+local DIR = luatexja.userid_table.DIR
51+local PROCESSED_BEGIN_FLAG = luatexja.icflag_table.PROCESSED_BEGIN_FLAG
52+
53+local dir_tate = luatexja.dir_table.dir_tate
54+local lang_ja = token.create('ltj@@japanese')[2]
55+------------------------------------------------------------------------
56+-- MAIN PROCESS STEP 1: replace fonts
57+------------------------------------------------------------------------
58+local wt, wtd = {}, {}
59+do
60+ local ltjd_get_dir_count = ltjd.get_dir_count
61+ local start_time_measure, stop_time_measure
62+ = ltjb.start_time_measure, ltjb.stop_time_measure
63+ local head
64+ local is_dir_tate
65+ local suppress_hyphenate_ja_aux = {}
66+ suppress_hyphenate_ja_aux[id_glyph] = function(p)
67+ if (has_attr(p, attr_icflag) or 0)<=0 and is_ucs_in_japanese_char(p) then
68+ local pc = getchar(p)
69+ local pf = ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)
70+ setfield(p, 'font', pf); set_attr(p, attr_curjfnt, pf)
71+ setfield(p, 'lang', lang_ja)
72+ set_attr(p, attr_orig_char, pc)
73+ end
74+ return p
75+ end
76+ suppress_hyphenate_ja_aux[id_math] = function(p)
77+ return node_end_of_math(node_next(p)) end
78+ suppress_hyphenate_ja_aux[50] = function(p) return p end
79+ suppress_hyphenate_ja_aux[id_whatsit] = function(p)
80+ if getsubtype(p)==sid_user then
81+ local uid = getfield(p, 'user_id')
82+ if uid==STCK then
83+ wt[#wt+1] = p; node_remove(head, p)
84+ elseif uid==DIR then
85+ if has_attr(p, attr_icflag)<PROCESSED_BEGIN_FLAG then
86+ ltjs.list_dir = has_attr(p, attr_dir)
87+ else
88+ wtd[#wtd+1] = p; node_remove(head, p)
89+ end
90+ end
91+ end
92+ return p
93+ end
94+
95+ local function suppress_hyphenate_ja (h,t)
96+ start_time_measure('ltj_hyphenate')
97+ head = to_direct(h)
98+ local p = head
99+ for i = 1,#wt do wt[i]=nil end
100+ for i = 1,#wtd do wtd[i]=nil end
101+ ltjs.list_dir=ltjd_get_dir_count()
102+ while p and p~=t do
103+ local pfunc = suppress_hyphenate_ja_aux[getid(p)]
104+ p = node_next(pfunc and pfunc(p) or p)
105+ end
106+ stop_time_measure('ltj_hyphenate'); start_time_measure('tex_hyphenate')
107+ lang.hyphenate(h, t)
108+ stop_time_measure('tex_hyphenate')
109+ return h
110+ end
111+
112+ luatexbase.add_to_callback('hyphenate',
113+ function (head,tail)
114+ return suppress_hyphenate_ja(head)
115+ end,'ltj.hyphenate')
116+end
117+
118+-- mode: true iff this function is called from hpack_filter
119+local ltjs_report_stack_level = ltjs.report_stack_level
120+local function set_box_stack_level(head, mode)
121+ local box_set, cl = 0, tex.currentgrouplevel + 1
122+ for _,p in pairs(wt) do
123+ if mode and getfield(p, 'value')==cl then box_set = 1 end; node_free(p)
124+ end
125+ ltjs_report_stack_level(tex_getcount('ltj@@stack') + box_set)
126+ for _,p in pairs(wtd) do
127+ node_free(p)
128+ end
129+ is_dir_tate = ltjs.list_dir == dir_tate
130+ if is_dir_tate then
131+ for p in Dnode.traverse_id(id_glyph,to_direct(head)) do
132+ if (has_attr(p, attr_icflag) or 0)<=0 and has_attr(p, attr_curjfnt)==getfont(p) then
133+ local pfn = has_attr(p, attr_curtfnt) or getfont(p)
134+ local pc = getchar(p)
135+ local pf = ltjf_replace_altfont(pfn, pc)
136+ set_attr(p, attr_dir, pc)
137+ pc = ltjf_get_vert_glyph(pf, pc) or pc
138+ setfield(p, 'char', pc); set_attr(p, attr_orig_char, pc)
139+ setfield(p, 'font', pf); set_attr(p, attr_curjfnt, pf)
140+ end
141+ end
142+ end
143+ return head
144+end
145+
146+-- CALLBACKS
147+luatexbase.add_to_callback('hpack_filter',
148+ function (head)
149+ return set_box_stack_level(head, true)
150+ end,'ltj.hpack_filter_pre',1)
151+luatexbase.add_to_callback('pre_linebreak_filter',
152+ function (head)
153+ return set_box_stack_level(head, false)
154+ end,'ltj.pre_linebreak_filter_pre',1)
155+
156+luatexja.pretreat = {
157+ set_box_stack_level = set_box_stack_level,
158+}
--- a/src/ltj-adjust.lua
+++ b/src/ltj-adjust.lua
@@ -46,7 +46,7 @@ local id_glue_spec = node.id('glue_spec')
4646 local id_whatsit = node.id('whatsit')
4747 local attr_icflag = luatexbase.attributes['ltj@icflag']
4848 local attr_jchar_class = luatexbase.attributes['ltj@charclass']
49-local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
49+local lang_ja = token.create('ltj@@japanese')[2]
5050
5151 local ltjf_font_metric_table = ltjf.font_metric_table
5252 local spec_zero_glue = ltjj.spec_zero_glue
@@ -189,7 +189,7 @@ local function aw_step1(p, res, total)
189189 -- and ((xi == id_penalty) or (xi == id_kern) or (xi == id_kern)) do
190190 -- x = node_prev(x); xi = getid(x)
191191 -- end
192- if xi == id_glyph and has_attr(x, attr_curjfnt) == getfont(x) then
192+ if xi == id_glyph and getfield(x, 'lang')==lang_ja then
193193 -- 和文文字
194194 xc = x
195195 elseif xi == id_hlist and get_attr_icflag(x) == PACKED then
--- a/src/ltj-jfmglue.lua
+++ b/src/ltj-jfmglue.lua
@@ -66,6 +66,7 @@ local id_box_like = 256 -- vbox, shifted hbox
6666 local id_pbox = 257 -- already processed nodes (by \unhbox)
6767 local id_pbox_w = 258 -- cluster which consists of a whatsit
6868 local sid_user = node.subtype('user_defined')
69+local lang_ja = token.create('ltj@@japanese')[2]
6970
7071 local sid_start_link = node.subtype('pdf_start_link')
7172 local sid_start_thread = node.subtype('pdf_start_thread')
@@ -89,7 +90,6 @@ local tex_dir
8990 local attr_ablshift
9091 local set_np_xspc_jachar
9192
92-local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
9393 local attr_dir = luatexbase.attributes['ltj@dir']
9494 local attr_icflag = luatexbase.attributes['ltj@icflag']
9595
@@ -99,10 +99,6 @@ end
9999
100100 -------------------- Helper functions
101101
102-local function copy_attr(new, old)
103- -- 仕様が決まるまで off にしておく
104-end
105-
106102 -- This function is called only for acquiring `special' characters.
107103 local function fast_find_char_class(c,m)
108104 return m.chars[c] or 0
@@ -234,7 +230,7 @@ local function check_box(box_ptr, box_end)
234230 first_char = p; find_first_char = false
235231 end
236232 last_char = p; found_visible_node = true
237- elseif pid==id_rule and get_attr_icflag(p)==PACKED then
233+ elseif pid==id_rule and get_attr_icflag(p)==PACKED then
238234 -- do nothing
239235 elseif not (pid==id_ins or pid==id_mark
240236 or pid==id_adjust or pid==id_whatsit
@@ -253,7 +249,7 @@ function check_box_high(Nx, box_ptr, box_end)
253249 local first_char = first_char
254250 if first_char then
255251 if getid(first_char)==id_glyph then
256- if getfont(first_char) == (has_attr(first_char, attr_curjfnt) or -1) then
252+ if getfield(first_char, 'lang') == lang_ja then
257253 set_np_xspc_jachar(Nx, first_char)
258254 else
259255 set_np_xspc_alchar(Nx, getchar(first_char),first_char, 1)
@@ -321,7 +317,7 @@ local min, max = math.min, math.max
321317 local function calc_np_aux_glyph_common(lp)
322318 Np.nuc = lp
323319 Np.id = npi
324- if (getfont(lp) == (has_attr(lp, attr_curjfnt) or -1)) then
320+ if getfield(lp, 'lang') == lang_ja then
325321 Np.id = id_jglyph
326322 set_np_xspc_jachar(Np, lp)
327323 local npi, npf
@@ -346,12 +342,12 @@ local function calc_np_aux_glyph_common(lp)
346342 lp=lx; break
347343 else
348344 local lid = getid(lx)
349- if lid==id_glyph and not(getfont(lx) == (has_attr(lx, attr_curjfnt) or -1)) then
345+ if lid==id_glyph and getfield(lx, 'lang') ~= lang_ja then
350346 -- 欧文文字
351347 last_glyph = lx; set_attr(lx, attr_icflag, PROCESSED); Np.last = lx
352348 y_adjust = has_attr(lx,attr_ablshift) or 0
353349 node_depth = max(getfield(lx, 'depth') + min(y_adjust, 0), node_depth)
354- adj_depth = (y_adjust>0) and max(getfield(lp, 'depth') + y_adjust, adj_depth) or adj_depth
350+ adj_depth = (y_adjust>0) and max(getfield(lx, 'depth') + y_adjust, adj_depth) or adj_depth
355351 setfield(lx, 'yoffset', getfield(lx, 'yoffset') - y_adjust)
356352 elseif lid==id_kern then
357353 local ls = getsubtype(lx)
@@ -633,7 +629,7 @@ do
633629 local s = Nx.last_char
634630 if s then
635631 if getid(s)==id_glyph then
636- if getfont(s) == (has_attr(s, attr_curjfnt) or -1) then
632+ if getfield(s, 'lang') == lang_ja then
637633 set_np_xspc_jachar(Nx, s)
638634 else
639635 set_np_xspc_alchar(Nx, getchar(s), s, 2)
--- a/src/ltj-jfont.lua
+++ b/src/ltj-jfont.lua
@@ -665,6 +665,7 @@ end
665665 -- MISC
666666 ------------------------------------------------------------------------
667667 do
668+ local get_dir_count = ltjd.get_dir_count
668669 local is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char_direct
669670 local tex_set_attr = tex.setattribute
670671 local font = font
@@ -677,7 +678,7 @@ do
677678 setfield(g, 'subtype', 1)
678679 set_attr(g, attr_icflag, ITALIC)
679680 if is_ucs_in_japanese_char(p) then
680- f = has_attr(p, attr_curjfnt)
681+ f = has_attr(p, (get_dir_count()==dir_tate) and attr_curtfnt or attr_curjfnt)
681682 local j = font_metric_table[f]
682683 setfield(g, 'kern', j.char_type[find_char_class(getchar(p), j)].italic)
683684 else
--- a/src/ltj-otf.lua
+++ b/src/ltj-otf.lua
@@ -8,6 +8,8 @@ luatexja.load_module('base'); local ltjb = luatexja.base
88 luatexja.load_module('jfont'); local ltjf = luatexja.jfont
99 luatexja.load_module('rmlgbm'); local ltjr = luatexja.rmlgbm
1010 luatexja.load_module('charrange'); local ltjc = luatexja.charrange
11+luatexja.load_module('direction'); local ltjd = luatexja.direction
12+luatexja.load_module('stack'); local ltjs = luatexja.stack
1113
1214 local id_glyph = node.id('glyph')
1315 local id_whatsit = node.id('whatsit')
@@ -41,13 +43,18 @@ local node_traverse_id = Dnode.traverse_id
4143 local identifiers = fonts.hashes.identifiers
4244
4345 local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
46+local attr_curtfnt = luatexbase.attributes['ltj@curtfnt']
4447 local attr_yablshift = luatexbase.attributes['ltj@yablshift']
4548 local attr_ykblshift = luatexbase.attributes['ltj@ykblshift']
49+local attr_tablshift = luatexbase.attributes['ltj@tablshift']
50+local attr_tkblshift = luatexbase.attributes['ltj@tkblshift']
51+local lang_ja = token.create('ltj@@japanese')[2]
4652
4753 local ltjf_font_metric_table = ltjf.font_metric_table
4854 local ltjf_find_char_class = ltjf.find_char_class
4955 local ltjr_cidfont_data = ltjr.cidfont_data
5056 local ltjc_is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char
57+local ltjd_get_dir_count = ltjd.get_dir_count
5158
5259 luatexja.userid_table.OTF = luatexbase.newuserwhatsitid('char_by_cid', 'luatexja')
5360 luatexja.userid_table.VSR = luatexbase.newuserwhatsitid('replace_vs', 'luatexja')
@@ -80,43 +87,51 @@ end
8087 -- This whatsit node will be extracted to a glyph_node
8188 local function append_jglyph(char)
8289 local p = node_new(id_whatsit,sid_user)
83- local v = tex.attribute[attr_curjfnt]
8490 setfield(p, 'user_id', OTF)
8591 setfield(p, 'type', 100)
8692 setfield(p, 'value', char)
87- set_attr(p, attr_yablshift, tex.attribute[attr_ykblshift])
8893 node_write(p)
8994 end
9095
91-local function cid(key)
92- if key==0 then return append_jglyph(char) end
93- local curjfnt = identifiers[tex.attribute[attr_curjfnt]]
94- if not curjfnt.cidinfo or
95- curjfnt.cidinfo.ordering ~= "Japan1" and
96- curjfnt.cidinfo.ordering ~= "GB1" and
97- curjfnt.cidinfo.ordering ~= "CNS1" and
98- curjfnt.cidinfo.ordering ~= "Korea1" then
99--- ltjb.package_warning('luatexja-otf',
100--- 'Current Japanese font (or other CJK font) "'
101--- ..curjfnt.psname..'" is not a CID-Keyed font (Adobe-Japan1 etc.)')
102- return append_jglyph(get_ucs_from_rmlgbm(key))
103- end
104- local char = curjfnt.resources.unicodes[curjfnt.cidinfo.ordering..'.'..tostring(key)]
105- if not char then
106- ltjb.package_warning('luatexja-otf',
107- 'Current Japanese font (or other CJK font) "'
108- ..curjfnt.psname..'" does not have the specified CID character ('
109- ..tostring(key)..')',
110- 'Use a font including the specified CID character.')
111- char = 0
96+local cid
97+do
98+ local dir_tate = luatexja.dir_table.dir_tate
99+ local tex_get_attr = tex.getattribute
100+ cid = function (key)
101+ if key==0 then return append_jglyph(char) end
102+ local curjfnt = identifiers[tex_get_attr((ltjd_get_dir_count()==dir_tate)
103+ and attr_curtfnt or attr_curjfnt)]
104+ if not curjfnt.cidinfo or
105+ curjfnt.cidinfo.ordering ~= "Japan1" and
106+ curjfnt.cidinfo.ordering ~= "GB1" and
107+ curjfnt.cidinfo.ordering ~= "CNS1" and
108+ curjfnt.cidinfo.ordering ~= "Korea1" then
109+ -- ltjb.package_warning('luatexja-otf',
110+ -- 'Current Japanese font (or other CJK font) "'
111+ -- ..curjfnt.psname..'" is not a CID-Keyed font (Adobe-Japan1 etc.)')
112+ return append_jglyph(get_ucs_from_rmlgbm(key))
113+ end
114+ local char = curjfnt.resources.unicodes[curjfnt.cidinfo.ordering..'.'..tostring(key)]
115+ if not char then
116+ ltjb.package_warning('luatexja-otf',
117+ 'Current Japanese font (or other CJK font) "'
118+ ..curjfnt.psname..'" does not have the specified CID character ('
119+ ..tostring(key)..')',
120+ 'Use a font including the specified CID character.')
121+ char = 0
122+ end
123+ return append_jglyph(char)
112124 end
113- return append_jglyph(char)
114125 end
115126
116127 local function extract(head)
117128 head = to_direct(head)
118129 local p = head
119130 local v
131+ local is_dir_tate = ltjs.list_dir == dir_tate
132+ local attr_ablshift = is_dir_tate and attr_tablshift or attr_yablshift
133+ local attr_kblshift = is_dir_tate and attr_tkblshift or attr_ykblshift
134+ local attr_curfnt = is_dir_tate and attr_curtfnt or attr_curjfnt
120135 while p do
121136 if getid(p)==id_whatsit then
122137 if getsubtype(p)==sid_user then
@@ -125,14 +140,12 @@ local function extract(head)
125140 local g = node_new(id_glyph)
126141 setfield(g, 'subtype', 0)
127142 setfield(g, 'char', getfield(p, 'value'))
128- v = has_attr(p, attr_curjfnt); setfield(g, 'font',v)
129- set_attr(g, attr_curjfnt, puid==OTF and v or -1)
130- -- VSR yields ALchar
131- v = has_attr(p, attr_yablshift)
132- if v then
133- set_attr(g, attr_yablshift, v)
143+ v = has_attr(p, attr_curfnt); setfield(g, 'font',v)
144+ if puid==OTF then
145+ setfield(g, 'lang', lang_ja)
146+ set_attr(g, attr_kblshift, has_attr(p, attr_kblshift))
134147 else
135- unset_attr(g, attr_yablshift)
148+ set_attr(g, attr_ablshift, has_attr(p, attr_ablshift))
136149 end
137150 head = node_insert_after(head, p, g)
138151 head = node_remove(head, p)
@@ -290,8 +303,6 @@ do
290303 setfield(p, 'user_id', uid)
291304 setfield(p, 'type', 100)
292305 setfield(p, 'value', char)
293- set_attr(p, attr_curjfnt, pf)
294- set_attr(p, attr_yablshift, has_attr(bp, attr_ykblshift) or 0)
295306 return p
296307 end
297308
@@ -314,7 +325,7 @@ do
314325 node_free(q)
315326 if pt then
316327 local np = ivs_jglyph(pt, p, pf,
317- (has_attr(p,attr_curjfnt) or 0)==pf and OTF or VSR)
328+ (getfield(p, 'lang') or 0)==lang_ja and OTF or VSR)
318329 head = node_insert_after(head, p, np)
319330 head = node_remove(head,p)
320331 node_free(p)
--- a/src/ltj-pretreat.lua
+++ b/src/ltj-pretreat.lua
@@ -51,14 +51,14 @@ local DIR = luatexja.userid_table.DIR
5151 local PROCESSED_BEGIN_FLAG = luatexja.icflag_table.PROCESSED_BEGIN_FLAG
5252
5353 local dir_tate = luatexja.dir_table.dir_tate
54-local lang_ja = token.create('ltj@japanese')[2]
54+local lang_ja = token.create('ltj@@japanese')[2]
5555 ------------------------------------------------------------------------
5656 -- MAIN PROCESS STEP 1: replace fonts
5757 ------------------------------------------------------------------------
5858 local wt, wtd = {}, {}
5959 do
6060 local ltjd_get_dir_count = ltjd.get_dir_count
61- local start_time_measure, stop_time_measure
61+ local start_time_measure, stop_time_measure
6262 = ltjb.start_time_measure, ltjb.stop_time_measure
6363 local head
6464 local is_dir_tate
@@ -67,9 +67,8 @@ do
6767 if (has_attr(p, attr_icflag) or 0)<=0 and is_ucs_in_japanese_char(p) then
6868 local pc = getchar(p)
6969 local pf = ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)
70- setfield(p, 'font', pf); set_attr(p, attr_curjfnt, pf)
70+ setfield(p, 'font', pf); --set_attr(p, attr_curjfnt, pf)
7171 setfield(p, 'lang', lang_ja)
72- --setfield(p, 'subtype', floor(getsubtype(p)*0.5)*2)
7372 set_attr(p, attr_orig_char, pc)
7473 end
7574 return p
@@ -78,7 +77,7 @@ do
7877 return node_end_of_math(node_next(p)) end
7978 suppress_hyphenate_ja_aux[50] = function(p) return p end
8079 suppress_hyphenate_ja_aux[id_whatsit] = function(p)
81- if getsubtype(p)==sid_user then
80+ if getsubtype(p)==sid_user then
8281 local uid = getfield(p, 'user_id')
8382 if uid==STCK then
8483 wt[#wt+1] = p; node_remove(head, p)
@@ -130,14 +129,14 @@ local function set_box_stack_level(head, mode)
130129 is_dir_tate = ltjs.list_dir == dir_tate
131130 if is_dir_tate then
132131 for p in Dnode.traverse_id(id_glyph,to_direct(head)) do
133- if (has_attr(p, attr_icflag) or 0)<=0 and has_attr(p, attr_curjfnt)==getfont(p) then
132+ if (has_attr(p, attr_icflag) or 0)<=0 and getfield(p, 'lang')==lang_ja then
134133 local pfn = has_attr(p, attr_curtfnt) or getfont(p)
135134 local pc = getchar(p)
136135 local pf = ltjf_replace_altfont(pfn, pc)
137136 set_attr(p, attr_dir, pc)
138137 pc = ltjf_get_vert_glyph(pf, pc) or pc
139138 setfield(p, 'char', pc); set_attr(p, attr_orig_char, pc)
140- setfield(p, 'font', pf); set_attr(p, attr_curjfnt, pf)
139+ setfield(p, 'font', pf); --set_attr(p, attr_curjfnt, pf)
141140 end
142141 end
143142 end