From a7c120ccb10459676e5cb83534b3a5a5ea150be1 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Thu, 30 Apr 2015 12:08:24 +0900 Subject: [PATCH] ltj-jfmglue.lua: fix on variation selectors --- src/ltj-jfmglue.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ltj-jfmglue.lua b/src/ltj-jfmglue.lua index e0cb298..8971a77 100644 --- a/src/ltj-jfmglue.lua +++ b/src/ltj-jfmglue.lua @@ -382,9 +382,12 @@ local function calc_np_aux_glyph_common(lp) local npn = Np.nuc Np.last_char = npn if r then + print(getfield(r, 'depth')) 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 -- 2.11.0